| View previous topic :: View next topic |
| Author |
Message |
speechles Revered One

Joined: 26 Aug 2006 Posts: 1398 Location: emerald triangle, california (coastal redwoods)
|
Posted: Fri Sep 22, 2006 3:12 pm Post subject: |
|
|
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-incith-google-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.  |
|
| Back to top |
|
 |
wout0r Voice
Joined: 03 Oct 2006 Posts: 2
|
Posted: Tue Oct 03, 2006 4:35 am Post subject: |
|
|
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 |
|
| Back to top |
|
 |
speechles Revered One

Joined: 26 Aug 2006 Posts: 1398 Location: emerald triangle, california (coastal redwoods)
|
Posted: Tue Oct 03, 2006 2:01 pm Post subject: |
|
|
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. |
|
| Back to top |
|
 |
wout0r Voice
Joined: 03 Oct 2006 Posts: 2
|
Posted: Wed Oct 04, 2006 3:33 am Post subject: |
|
|
Thanks for the reply; it helped indeed. _________________ it's the fruit that makes the fristi |
|
| Back to top |
|
 |
incith Master

Joined: 23 Apr 2005 Posts: 275 Location: Canada
|
Posted: Thu Oct 05, 2006 1:43 pm Post subject: |
|
|
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-google-icvs.tcl.gz
Regards~ _________________ ; Answer a few unanswered posts! |
|
| Back to top |
|
 |
hello Voice
Joined: 06 Oct 2006 Posts: 4
|
Posted: Fri Oct 06, 2006 11:44 am Post subject: |
|
|
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 |
|
| Back to top |
|
 |
speechles Revered One

Joined: 26 Aug 2006 Posts: 1398 Location: emerald triangle, california (coastal redwoods)
|
Posted: Fri Oct 06, 2006 4:50 pm Post subject: |
|
|
@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: | | 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: | | 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:
| Quote: | <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/themes/standard/icon_xbox360.gif" align="absbottom"> Xbox 360
</td>
<td width="140">
<input type="checkbox" name="platform[]" value="13"> <img src="http://img.gamespot.com/gamespot/shared/head2/xbox_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 ) and let's see where I get..
The two lists I need were in a drop down box side by side, see below: | Quote: | <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 |
|
| Back to top |
|
 |
rosc2112 Revered One

Joined: 19 Feb 2006 Posts: 1454 Location: Northeast Pennsylvania
|
Posted: Fri Oct 06, 2006 11:18 pm Post subject: |
|
|
| 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.) |
|
| Back to top |
|
 |
Torrevado Op
Joined: 02 Aug 2006 Posts: 101
|
Posted: Sat Oct 28, 2006 8:08 pm Post subject: "modify" incith-google.tcl |
|
|
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&usg=__th4rmhJ1-JzdBt8l8ehu_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 ) ?
Thanks |
|
| Back to top |
|
 |
speechles Revered One

Joined: 26 Aug 2006 Posts: 1398 Location: emerald triangle, california (coastal redwoods)
|
Posted: Tue Oct 31, 2006 12:37 am Post subject: |
|
|
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: | # 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: | # 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 "" |
|
|
| Back to top |
|
 |
Torrevado Op
Joined: 02 Aug 2006 Posts: 101
|
Posted: Tue Oct 31, 2006 12:23 pm Post subject: |
|
|
It works !!
Thanks speechles  |
|
| Back to top |
|
 |
incith Master

Joined: 23 Apr 2005 Posts: 275 Location: Canada
|
Posted: Tue Oct 31, 2006 12:31 pm Post subject: |
|
|
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.. _________________ ; Answer a few unanswered posts! |
|
| Back to top |
|
 |
euphoriac Voice
Joined: 06 Jul 2006 Posts: 4
|
Posted: Fri Nov 03, 2006 10:20 am Post subject: |
|
|
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. |
|
| Back to top |
|
 |
madwoota Halfop
Joined: 09 Aug 2005 Posts: 53
|
Posted: Tue Nov 07, 2006 9:50 am Post subject: |
|
|
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-google-current.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.
Regards,
-madwoota |
|
| Back to top |
|
 |
ZEXEL Halfop

Joined: 27 Jun 2006 Posts: 45
|
Posted: Tue Nov 07, 2006 10:14 am Post subject: Yawww... |
|
|
greats! I will be waiting for it...
btw, thanks for post here!
 _________________ .:[ Knowledge Is The Power ]:. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|