This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

incith:google :)

Support & discussion of released scripts, and announcements of new releases.
Post Reply
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

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...
h
hello
Voice
Posts: 4
Joined: Fri Oct 06, 2006 11:38 am

Post by hello »

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.
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

@De Kus,

Code: Select all

      # 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..
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

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...
User avatar
incith
Master
Posts: 275
Joined: Sat Apr 23, 2005 2:16 am
Location: Canada

Post by incith »

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~
m
madwoota
Halfop
Posts: 53
Joined: Tue Aug 09, 2005 12:27 am

Post by madwoota »

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-g ... ent.tar.gz

-madwoota
v
v00j00
Voice
Posts: 4
Joined: Sun Dec 18, 2005 8:59 am

Post by v00j00 »

I was wondering why my egg was acting up after I rebooted, I thought I broke it.

Thanks madwoota!
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

the script missing URL character conversion...
!google 13:48 <+ultra> Hi everybody
leads to

Code: Select all

[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:
...
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
Last edited by De Kus on Sun Nov 19, 2006 6:14 am, edited 1 time in total.
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...
m
madwoota
Halfop
Posts: 53
Joined: Tue Aug 09, 2005 12:27 am

Post by madwoota »

De Kus wrote:the script missing URL character conversion...
!google 13:48 <+ultra> Hi everybody
leads to

Code: Select all

[12:50:12] #De_Kus# set errorInfo
Currently: Illegal characters in URL path
Currently:     while executing 
For me, it leads to this:

Code: Select all

<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.
h
h44i
Voice
Posts: 12
Joined: Tue Feb 28, 2006 6:39 pm

Post by h44i »

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.
User avatar
incith
Master
Posts: 275
Joined: Sat Apr 23, 2005 2:16 am
Location: Canada

Post by incith »

Seems to be working good for us still.

Download the latest version @ http://xrl.us/incithgoogle
C
Cold Shady
Voice
Posts: 2
Joined: Fri Feb 02, 2007 9:18 am

Post by Cold Shady »

I'm using incith:google v1.8.6 and it seems that the url's don't come through properly.

Code: Select all

[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?
User avatar
incith
Master
Posts: 275
Joined: Sat Apr 23, 2005 2:16 am
Location: Canada

Post by incith »

Yes, I fixed this earlier when a user mentioned it to me.. go down to the line:

Code: Select all

        # regular search
about line 445. Look for..

Code: Select all

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: Select all

regexp -- {<div.+?class=g.*?<a.+?href=(.+?)\s+?.*?>(.+?)</a>} $html - link desc
Regards,
C
Cold Shady
Voice
Posts: 2
Joined: Fri Feb 02, 2007 9:18 am

Post by Cold Shady »

Thank you! :)
User avatar
incith
Master
Posts: 275
Joined: Sat Apr 23, 2005 2:16 am
Location: Canada

Post by incith »

Download: incith-google.tcl

Temporary fixed version. :)
Post Reply