| View previous topic :: View next topic |
| Author |
Message |
De Kus Revered One

Joined: 15 Dec 2002 Posts: 1361 Location: Germany
|
Posted: Thu Nov 09, 2006 2:47 pm Post subject: |
|
|
Is it possible to skip subresults?
example:
http://www.google.de/search?q=incith
the script prints the subresult as the second result instead of the true second result.
btw. I am using v1.8.4. _________________ De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens... |
|
| Back to top |
|
 |
hello Voice
Joined: 06 Oct 2006 Posts: 4
|
Posted: Thu Nov 09, 2006 3:23 pm Post subject: |
|
|
Thanks speechless on the update of my question can't wait until u get some time to play with it on adding that.
Thank madwoota on the update will be nice to see google 2.0 once you are done with it and ready to release it. |
|
| Back to top |
|
 |
speechles Revered One

Joined: 26 Aug 2006 Posts: 1398 Location: emerald triangle, california (coastal redwoods)
|
Posted: Fri Nov 10, 2006 10:18 pm Post subject: |
|
|
@De Kus, | Code: | # fetch the html
set html [fetch_html $input 1]
# dunno how efficient this is, but all sibling results are within <blockquote's>
# so this might be all you need. who knows. i barely know tcl, but luv regsub's.. heh
regsub -all -- {<blockquote.+?>(.+?)<.+?blockquote>} $html {} html | more of a quick pre-parsing hack than an actual fix within the google regexp/regsub's, but it _should_ work
@hello,
i'm improving some of my procs in an effort to clean them up to port them over to madwoota's 2.0 update (when it's released that is).. I'll link something soon when I finally get it working like I want it to.. |
|
| Back to top |
|
 |
De Kus Revered One

Joined: 15 Dec 2002 Posts: 1361 Location: Germany
|
Posted: Tue Nov 14, 2006 7:31 am Post subject: |
|
|
its a nasty hack, but I can confirm it fixing the issue. _________________ De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens... |
|
| Back to top |
|
 |
incith Master

Joined: 23 Apr 2005 Posts: 275 Location: Canada
|
Posted: Wed Nov 15, 2006 5:40 am Post subject: |
|
|
Regular searches seem to be broken tonight, they can be fixed via finding the # regular searches line in proc google (sorry it's not open right now and I'm posting this in a rush), and changing the regexp <p to regexp <div, and the regsub a few lines below it also from the <p to <div
Regards~ _________________ ; Answer a few unanswered posts! |
|
| Back to top |
|
 |
madwoota Halfop
Joined: 09 Aug 2005 Posts: 53
|
Posted: Wed Nov 15, 2006 10:13 am Post subject: |
|
|
EMERGENCY BUGFIX RELEASE! for v1.8 series - now at v1.8.5
- fixed main google results broke ! Google changed <p> -> <div>
- fixed weather
- fixed area code map results (eg: !g 90210 or !g beverly hills, ca)
- added new setting (subresults) to DEFAULT to NOT return secondary results - seems like blockquotes are gone speechless
Looks like there is a bunch more stuff thats broken too ... but I'll get to them soon(ish).
http://www.woota.net/~madwoota/incith-google-current.tar.gz
-madwoota |
|
| Back to top |
|
 |
v00j00 Voice
Joined: 18 Dec 2005 Posts: 4
|
Posted: Wed Nov 15, 2006 3:26 pm Post subject: |
|
|
I was wondering why my egg was acting up after I rebooted, I thought I broke it.
Thanks madwoota! |
|
| Back to top |
|
 |
De Kus Revered One

Joined: 15 Dec 2002 Posts: 1361 Location: Germany
|
Posted: Fri Nov 17, 2006 8:54 am Post subject: |
|
|
the script missing URL character conversion...
| Quote: | | !google 13:48 <+ultra> Hi everybody |
leads to
| Code: | [12:50:12] #De_Kus# set errorInfo
Currently: Illegal characters in URL path
Currently: while executing
Currently: "::http::geturl $query -timeout [expr 1000 * 10]"
Currently: (procedure "fetch_html" line 50)
Currently: invoked from within
Currently: "fetch_html $input 1"
Currently: (procedure "google" line 16)
Currently: invoked from within
Currently: "google $search"
Currently: (procedure "send_output" line 39)
Currently: invoked from within
Currently: "send_output "$input" "$chan" "$nick" "$uhand""
Currently: (procedure "incith::google::public_message" line 16)
Currently: invoked from within
Currently: "incith::google::public_message $_pubm1 $_pubm2 $_pubm3 $_pubm4 $_pubm5" |
Edit:
| Quote: | ...
running eggdrop v1.6.18:
...
OS: Linux 2.6.16-test-ovz
Tcl library: /usr/local/lib/tcl8.4
Tcl version: 8.4.13 (header version 8.4.13)
.tcl package require http 2.4
Tcl: 2.5.2 |
_________________ De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
Last edited by De Kus on Sun Nov 19, 2006 6:14 am; edited 1 time in total |
|
| Back to top |
|
 |
madwoota Halfop
Joined: 09 Aug 2005 Posts: 53
|
Posted: Sat Nov 18, 2006 8:16 pm Post subject: |
|
|
| De Kus wrote: | the script missing URL character conversion...
| Quote: | | !google 13:48 <+ultra> Hi everybody |
leads to | Code: | [12:50:12] #De_Kus# set errorInfo
Currently: Illegal characters in URL path
Currently: while executing |
|
For me, it leads to this:
| Code: |
<madwoota> !google 13:48 <+ultra> Hi everybody
<|EggDrop|> New TyTn / M3100 Owners buying memory ca @ http://forum.xda-developers.com/archive/index.php/t-274008.html | Seeking-delays-from @ http://www.fibul.com/group-1339-13.html | Ultra Gypsy's topics - tribe.net @ http://ultragypsy.tribe.net/threads/rss |
Although I do agree with your point, I should probably be sanitising the input string before it gets submitted to the url fetcher. |
|
| Back to top |
|
 |
h44i Voice
Joined: 28 Feb 2006 Posts: 12
|
Posted: Sat Jan 20, 2007 11:07 am Post subject: |
|
|
I'm running the latest Eggdrop on Debian Etch and I just installed the latest version of this script. It works flawless but there's one bug I guess. It only outputs 1 search result. The TCL has 3 results configured though.
Any ideas? Did not change anything to the TCL, it's like it's provided a few posts above. |
|
| Back to top |
|
 |
incith Master

Joined: 23 Apr 2005 Posts: 275 Location: Canada
|
|
| Back to top |
|
 |
Cold Shady Voice
Joined: 02 Feb 2007 Posts: 2
|
Posted: Fri Feb 02, 2007 9:24 am Post subject: |
|
|
I'm using incith:google v1.8.6 and it seems that the url's don't come through properly.
| Code: | [14:21:57] <Cold_Shady> !google woot
[14:21:57] <Gammle> Woot : One Day, One Deal @ http://www.woot.com/%20class=l
[14:21:59] <Gammle> Woot : One Day, One Deal @ http://www.woot.com/Default.aspx%20class=l
[14:22:00] <Gammle> Woot (retailer) - Wikipedia, the free @ http://en.wikipedia.org/wiki/Woot.com%20class=l |
I'm trying to fix it, but haven't got any luck so far.
Any suggestions? |
|
| Back to top |
|
 |
incith Master

Joined: 23 Apr 2005 Posts: 275 Location: Canada
|
Posted: Fri Feb 02, 2007 12:37 pm Post subject: |
|
|
Yes, I fixed this earlier when a user mentioned it to me.. go down to the line:
about line 445. Look for..
| Code: | | regexp -- {<div.+?class=g.*?<a.+?href=(.+?)</a>} $html - link desc | about 6 or 7 lines down, above if {[info exists link] == 1}, and change the regexp to this:
| Code: | | regexp -- {<div.+?class=g.*?<a.+?href=(.+?)\s+?.*?>(.+?)</a>} $html - link desc |
Regards, _________________ ; Answer a few unanswered posts! |
|
| Back to top |
|
 |
Cold Shady Voice
Joined: 02 Feb 2007 Posts: 2
|
Posted: Fri Feb 02, 2007 8:09 pm Post subject: |
|
|
Thank you!  |
|
| Back to top |
|
 |
incith Master

Joined: 23 Apr 2005 Posts: 275 Location: Canada
|
|
| Back to top |
|
 |
|