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

Post by speechles »

Now i know this one works, this is my WIP tcl, but since I'm not fully sure if that old tcl I posted worked.. I figured I would share what I had up to this point. The code is rough on the !wiki and !review procs because it's far from final, but I am sure this works because I see it used everyday..

consider this unofficial, call it say 1.9.3 and get it below:
http://kiczek.com/ereader/UNOFFICIAL-in ... -v1.93.tcl

tested on windrop, eggdrop v1.6.17 also on linux, eggdrop v1.6.18..
if you prefer madwoota's script, find it in the archive, this was just written as an attempt to learn tcl and make an already awesome script more gamer friendly. :D
w
wout0r
Voice
Posts: 2
Joined: Tue Oct 03, 2006 4:30 am

Post by wout0r »

I have loaded the tcl into mine eggdrop, I am using eggdrop v1.6.17, on Linux 2.6.17.11-grsec.

But somehow I cant get the script working
if I type !gamefaqs xbox in usa in the irc chan the bot won't do a thing ;(

any ideas what it can be?
do I need to chanset it first ? (i'm not using the google feature)
it's the fruit that makes the fristi
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

you need to:
.chanset #yourchan +google

afterall, the gamefaqs is incorporated, if you don't want certain functions working, look in the config section for "_results" and set those to 0 to disable them.
w
wout0r
Voice
Posts: 2
Joined: Tue Oct 03, 2006 4:30 am

Post by wout0r »

Thanks for the reply; it helped indeed.
it's the fruit that makes the fristi
User avatar
incith
Master
Posts: 275
Joined: Sat Apr 23, 2005 2:16 am
Location: Canada

Post by incith »

Just thought I'd pop in to say, madwoota is slowly working on a new version of google, revamped and cleaned up, it's just taking some time, real life and all.

If anyone wants a version with !local searches working, you can grab my version which is based off madwoota last cvs: http://incith.incith.com/eggdrop/incith ... cvs.tcl.gz

Regards~
h
hello
Voice
Posts: 4
Joined: Fri Oct 06, 2006 11:38 am

Post by hello »

Hi guys

Any chance we could get on the !review game it have the platform also

like this

(nick) !review metal of honor xbox
(eggy) Sorry, no search results were found.(or if its not on that platform have it say game is not on this platform)

where u have to put what platform u want the review to come from and if u don't put a platform then it just takes the first one it see's and if no review the maybe do just the normal as I know some games do not come on
all the platforms.

Thanks for the great scripts
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

@incith and madwoota;
mad respect and I love the scripting style very very elegant (commented code is always nice to learn from). this unofficial stuff I wrote is by no means to replace your efforts, keep up the good work mates. :)

@hello;
The problem there is two fold. First off, gamespot doesn't let you search very easily. Right now to search, script just uses this:

Code: Select all

http://www.gamespot.com/pages/search/index.php?qs=${input}
using the above url, doesnt allow parsing with systems, etc, as part of the query.. To do that, they would rather people use what is below:

Code: Select all

http://www.gamespot.com/pages/search/adv_search.php?qs=${input}
the problem with this, is gamespot uses forms on this search page, and each system isn't simply 'GBA' for gameboy advance, 'XBOX' for xbox.. its some cryptic number.. like below:
<input type="checkbox" name="platform[]" value="5"> <img src="http://img.gamespot.com/gamespot/shared/head2/pc_on.gif">  PC
</td>
<td width="140">
<input type="checkbox" name="platform[]" value="1029"> <img src="http://i.i.com.com/cnet.g2/shared/gs5/t ... box360.gif" align="absbottom">  Xbox 360
</td>
<td width="140">
<input type="checkbox" name="platform[]" value="13"> <img src="http://img.gamespot.com/gamespot/shared ... box_on.gif" align="absbottom">  Xbox
so 5 == PC, 1029 == X360, 13 = XBOX, very very cryptic ;/
A list of those numbers in order, and another list with systems in same order, would be needed. That way you just check the 2nd list for type of system person wants the game review for, and the corresponding spot in the 1st list is the cryptic number it is.. plus all the work required to make it properly submit the form and get the correct html..heh, it's a handful...

IGN also could be used, but doesn't actually have scores or game rankings like gamespot does. When I learn a bit more TCL I will tackle how to approach fixing it to use the forms submittal url instead of the query url it uses presently..

edit-------------------------------------
After investigating a bit, this wouldn't be so hard as first thought.. Gimme a week or so (I have a real life too :P) and let's see where I get.. ;)
The two lists I need were in a drop down box side by side, see below:
<select name="platform[]" style="font-face: verdana; font-size: 9px">
<option></option>
<option value="15">3DO</option>
<option value="1042">Adventurevision</option>
..snipped because of length..
<option value="23">WonderSwan Color</option>
<option value="1027">Zodiac</option>
to be continued... hehehe
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

speechles wrote: the problem with this, is gamespot uses forms on this search page, and each system isn't simply 'GBA' for gameboy advance, 'XBOX' for xbox.. its some cryptic number..
Easy to do, look at the earthcal.tcl script I just did, it uses index numbers from the remote website as well. Just make a list with the name:number and then a small search proc to look up the corresponding number for a particular name..

The weather script I (re)did also uses a similar search function to look up weather WMO codes or country names (does it both ways, code to country, or country to code.)
T
Torrevado
Op
Posts: 101
Joined: Wed Aug 02, 2006 6:29 pm

"modify" incith-google.tcl

Post by Torrevado »

Hi,
I'd like to 'delete' links given by "!google define" command, that is:

- !g define:eggdrop
- Eggdrop is a popular IRC bot. It was originally written in the December of 1993 by Robey Pointer to watch a single channel. It is written in the C programming language, and features an interface for scripts that allow the user to enhance the functionality of the bot. The language used in the script interface is Tcl. @ http://en.wikipedia.org/wiki/Eggdrop&us ... hu_r1sHMk= (http://www.google.com/search?hl=all&q=define:eggdrop )

I want that links not to be displayed, I want just the definition, is it possible (and easy please :wink: ) ?

Thanks
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

Yeah.. I too have noticed that lately google is adding bullshit to the end of definition links, effectively breaking them.
I've spotted two useless url tags so far and removed them..
http://en.wikipedia.org/wiki/Eggdrop&usg=__th4rmhJ1-JzdBt8l8ehu_r1sHMk= (http://www.google.com/search?hl=all&q=define:eggdrop
here's the fix:

Code: Select all

        # define:
        } elseif {[string match "define:*" $input] == 1} {
          regexp -- {<li>(.+?)(?=\s*<li>|<br>).*<a href.*(http.+?)">} $html - desc link
          regsub -- {<li>(.+?)(?=\s*<li>|<br>)} $html {} html
          regsub -all -- {\+} $input {%2B} define_input
          regsub -all -- { } $define_input {+} define_input
          if {[info exists link] == 1} {
            regsub -all " " $link "%20" link
            regexp -- {(.+?)\&sig=} $link - link
            regexp -- {(.+?)\&usg=} $link - link 
            append link " ( http://www.google.com/search?hl=${incith::google::language}&q=${define_input} )"
          }
The change above will only remove the bullshit off the end of the link, the red part.
@fly: To completely remove the link (also removes the @ which you didn't include but I know you meant to) change the define section like below:

Code: Select all

        # define:
        } elseif {[string match "define:*" $input] == 1} {
          regexp -- {<li>(.+?)(?=\s*<li>|<br>).*<a href} $html - desc
          regsub -- {<li>(.+?)(?=\s*<li>|<br>)} $html {} html
          regsub -all -- {\+} $input {%2B} define_input
          regsub -all -- { } $define_input {+} define_input
          set link ""
T
Torrevado
Op
Posts: 101
Joined: Wed Aug 02, 2006 6:29 pm

Post by Torrevado »

It works !!
Thanks speechles :)
User avatar
incith
Master
Posts: 275
Joined: Sat Apr 23, 2005 2:16 am
Location: Canada

Post by incith »

First solution to me would be to regsub the values in the html.. regsub -all {value="1029"} $html {value="XBOX"} html

*shrug*

Then you can just search for xbox..
e
euphoriac
Voice
Posts: 4
Joined: Thu Jul 06, 2006 5:19 pm

Post by euphoriac »

I have trouble using !google when searching for an exact phrase, using quotes.

i.e.: !google "do quotes work with this new vers"

No reply in chan with this appearing in dcc chat:

[14:54] Tcl error [incith::google::public_message]: Illegal characters in URL path

Used to be able to use quotes in an earlier madwoota version, then on an upgrade they were broken, I can't remember which. I tried the speechles version and the same problem occurs. I've installed a fresh 1.6.18 copy to test this new script. Is it possible to fix this or change the script to allow " in the url?

Thanks.
m
madwoota
Halfop
Posts: 53
Joined: Tue Aug 09, 2005 12:27 am

Post by madwoota »

Hi, another bugfix release for incith-google (v1.8 series) - now at version 1.8.4.

From the changelog:
- fixed tracking rubbish after links on define: lookups
- fixed local lookups ... again
- fixed spell: from returning "0"
- added option to disable either weblink or google link on "!g define:"
- added stock quotes (try !g intc or !g amd)

Available here:
http://www.woota.net/~madwoota/incith-g ... ent.tar.gz

This incorporates the bugs & features from the last few posts, as well as a bunch of other junk I've fixed up along the way.


PS: I'm still working on a complete re-write of google which will incorporate a fairly substantial shift from a single (bloated/horrid/impossible to manage) script to a module based setup where you can (more) easily plugin alternate sites, addons, features, updates(!), etc. Hell, the scope creep is getting so bad the script is already doing all of its own maintenance for you :)

So, google 2.0. Its coming. One day. :roll:

Regards,
-madwoota
User avatar
ZEXEL
Halfop
Posts: 45
Joined: Tue Jun 27, 2006 10:47 pm
Contact:

Yawww...

Post by ZEXEL »

greats! I will be waiting for it...
btw, thanks for post here!
:wink: :wink: :wink: :wink: :wink:
.:[ Knowledge Is The Power ]:.
Post Reply