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.

UNOFFICIAL incith-google 2.1x (Nov30,2o12)

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 »

@Zircon: Haw.. It's all good. I don't really mind all the fluff and mindless bickering about the sites this script sources from. It's just there are much better places to discuss these sites "problems" than in a thread devoted to a script which merely scrapes these aforementioned sites.

@rpope904, You want the official incith google support thread -> http://forum.egghelp.org/viewtopic.php?t=10175&start=0

Main point in all this:
The main issue is there were major problems, unexpected issues and all sorts of other road blocks that were conquered in the creation of this script. What should be the main topic of discussion is the situation when bugs/html changes arise, and hopefully a prompt solution is brought immediately to the forefront. Which is all I have been trying to do here. Supplying my own irc channels with the most kick ass search script on 'teh net' (INCITH R0X!) while allowing the world to participate in beta testing multi-language expansions.. ;)

The same list of features madwoota (current maintainer of the official incith:google script) wished for here, are for the most part realized completely. Some code isn't elegant and parts could be condensed greatly with sub-procs, but that isn't as much a concern for the moment as keeping functionality is all that really matters to most people... and I expect the moment that functionality is hampered in any manner, those same people will post something about it here. Enjoy the script, praise incith. :D

.:EDIT[feb 4th]:. Corrected slight inaccuracy regarding encodings used by wikipedia in both url format and subtagging. Wikipedia allows things to be encoded or decoded in the html, browsers can handle this, so now can this script. Wikipedia should now behave correctly when using #subtags and using symbols and other such characters as input. Reget the script at any v1.9.8 link above.
<speechles> !w [die]"{die}|<die>""
<sp33chy> Die | Die may refer to: Objects Die (manufacturing), material-shaping device. Die (integrated circuit), rectangular fragment of a semiconductor wafer. Die, cube or other polyhedron for making random choices, usually as one of two or more dice. Tap and die, cutting tools used to create screw threads in solid substances.. Other Die, Drôme, particular territorial unit in France. DIE, German Development
<sp33chy> Institute. DiE, pedagogical method Drama in Education. Die (musician), Japanese musician. @ http://en.wikipedia.org/wiki/Die [1 Redirect(s)]

<speechles> !g [die]{die}\/\\\\[die]
<sp33chy> 58,400,000 Results | The Death Clock - When Am I Going To Di @ http://www.deathclock.com/ | Die! Press release! Die! Die! Die @ http://www.siliconvalleywatcher.com/mt/ ... _relea.php | YouTube - Die Hard - Music Video - NEW @ http://www.youtube.com/watch?v=OTyw6cq86kY | Black Friday Die Die Die / America's m @
<sp33chy> http://www.sfgate.com/cgi-bin/article.c ... 112807.DTL

<selhceeps> !g .nl """""/\\
<sp33chy> Uw zoekbewerking - """""/\\ - heeft geen overeenkomstige documenten opgeleverd
Special characters are no longer a problem either as demonstrated above. Encodings are now handled 100% accurately for "any" language with both input and output.

Also, seperated the help section so those not native english speaking can tailor this appropriately for their own dialect. see below.

Code: Select all

#---> NOTE:
#---> IF YOUR PRIMARY LANGUAGE ISN'T ENGLISH YOU MUST CHANGE THIS SECTION BELOW POSSIBLY
    # this is the help list generated by the bot to help users become familiar with the script.
    # you can change these here to affect the language used when help is asked for.
    # there MUST be 27 entries in this list, the first must be the word for ALL.
    # ------
    variable helplist "all google images groups news local book video fight youtube translate gamespot gamefaqs blog ebay ebayfight wikipedia wikimedia locate review torrent top popular dailymotion ign myspace trends"

    # english words within the help phrases, spacing must be kept as it is below.
    # ------
    variable helpmsg1 "Help is only available for the following:"
    variable helpmsg2 "is disabled."
    variable helpmsg3 "with "
    variable helpmsg4 " results."

    # the help messages given.
    # ------
    variable help1 "\[.google.country.code\] \[define:|spell:|movie:\] <search terms> <1+1> <1 cm in ft> <patent ##> <weather city|zip> <??? airport>" ;#google
    ...
    variable help26 "\[.google.country.code\] <YYYY-MM-DD>" ;#trends
<speechles> !gf wii in aus
<sp33chy> Wii Australia (AUS) | 02/05 Karaoke Revolution Presents: American Idol Encore | My Horse and Me | Octomania | The Spiderwick Chronicles | 02/11 Dora the Explorer: Dora Saves the Mermaids | Go, Diego, Go!: Safari Rescue | 02/12 Jumper | London Taxi Rush Hour | 02/18 MX vs. ATV Untamed | 02/19 Pimp My Ride | 02/25 Agatha Christie: And Then There Were None | Destroy All Humans! Big Willy
<sp33chy> Unleashed | 02/26 Dragon Quest Swords: The Masked Queen and the Tower of Mirrors | Kidz Sports International Soccer | Sega Bass Fishing | WWII Aces | 03/03 Bully: Scholarship Edition | Major League Baseball 2K8 | 03/04 Ninja Reflex | 03/09 Super Smash Bros. Brawl
Noticed gamefaqs changed some things, any region query would bring up entire list of game, not just that region. While fixing noticed they have now added australia into their databse, so added it into the script as well. Enjoy, find it on first page v1.9.8 link :P
User avatar
elisca
Halfop
Posts: 65
Joined: Sat Jan 27, 2007 4:23 am
Location: in the middle of nowhere

Post by elisca »

<me> !g 58.56/12
<bot> 688 Results | 58.56 / 12 = 4.88 | [PDF] 2005/06 FIBT AIT Women's Bobsleigh @ http://www.orda.org/newsite/events/worl ... bwomen.pdf | SETON HALL GIRLS DAY TWO @ http://www.monmouth.com/~scullion/2kresu~1/setong2.htm | MHSAA Class A Boys Swimming Finals @ http://www.mhsaa.com/sports/bsw/2002bfin.html
i just need 58.56 / 12 = 4.88 as result, anyone help me to fix it.. thanks in advance :oops:
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

elisca wrote:
<me> !g 58.56/12
<bot> 688 Results | 58.56 / 12 = 4.88 | [PDF] 2005/06 FIBT AIT Women's Bobsleigh @ http://www.orda.org/newsite/events/worl ... bwomen.pdf | SETON HALL GIRLS DAY TWO @ http://www.monmouth.com/~scullion/2kresu~1/setong2.htm | MHSAA Class A Boys Swimming Finals @ http://www.mhsaa.com/sports/bsw/2002bfin.html
i just need 58.56 / 12 = 4.88 as result, anyone help me to fix it.. thanks in advance :oops:
FIX?!! There is nothing to fix, it is mirroring google... :roll:
To get just that result, try using a smarter query (see below). It behaves exactly as google does, which is intentional. It's a google script, not merely a calculator...
<speechles> !g 0 + ( 58.56/12 )
<sp33chy> 0 + (58.56 / 12) = 4.88
Side Note: Noticed strange behavior with both wikipedia/wikimedia regarding subtag lookups. Subtags are looked up using priorities. First by direct match, secondly by starting off the tag, and lastly by being anywhere in the tag. It was the regexp used to detect this anywhere in the tag that was causing problems with placement. I've since found a cleaner regexp to use and it definitely solves the problem as you can see below.
<speechles> !wm .en.wikiquote.org trailer park boys#swear
<sp33chy> Trailer Park Boys | : If I Can't Smoke and Swear I'm [censored] [Ricky is sleeping on the hood of his car/home during during the daytime, his daughter runs up to him.] Trinity: Daddy, wake up! Wake up daddy, wake up, wake up! It's time to put my patch on, hurry up daddy. [During a 'confessional']" Ricky: Trinity has Got to quit smoking, like i can't have her smoking anymore, it's ridiculous. Ricky: She
<sp33chy> had the idea, that maybe me and her can quit together, and it's kind of like a good father daughter thing, so we're going to quit together, we're going to go on the patch. [Ricky is training Cory and Trevor to steal gasoline.]" Ricky: Unleaded - blue container, supreme - red container, diesel in the green. Okay? are we clear her @
<sp33chy> http://en.wikiquote.org/wiki/Trailer_Pa ... 27m_[censored] [2 Redirect(s)]
Same v1.9.8 link anywhere above contains this fix. enjoyz ;)
r
rpope904
Voice
Posts: 16
Joined: Sat Feb 02, 2008 7:41 pm

Post by rpope904 »

How would I limit this to just results from a specific site? Right now I am using !g site:forums.xxxx.xxxx <string> but i'd like to hard-code it in to only return from one site.. Also, it's just showing one result

[16:40] <rp[work]> !g site:forums.x10hosting.com cpanel password
[16:40] <x10Helper> 959 Results
[16:40] <x10Helper> cPanel password reset - Page 2 - x10Ho @ http://forums.x10hosting.com/server-mov ... set-2.html
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

rpope904 wrote:How would I limit this to just results from a specific site? Right now I am using !g site:forums.xxxx.xxxx <string> but i'd like to hard-code it in to only return from one site.. Also, it's just showing one result

[16:40] <rp[work]> !g site:forums.x10hosting.com cpanel password
[16:40] <x10Helper> 959 Results
[16:40] <x10Helper> cPanel password reset - Page 2 - x10Ho @ http://forums.x10hosting.com/server-mov ... set-2.html
It's quite simple if you know just a small bit of tcl. You just need to look for the set html [fetch_html $input XX] part of each proc. This is the part which grabs the html for the proc to process. The XX will be always be a number. In the Fetch_html proc these numbers are used to build a query for each site. Google search is 1. You just hard code your additional data into the url string variable fetch_html uses.
<speechles> !g site:forums.x10hosting.com cpanel password
[2:33pm] <sp33chy> 983 Results | cPanel password reset - x10Hosting For @ http://forums.x10hosting.com/server-mov ... reset.html | cPanel Password not working - x10Hosti @ http://forums.x10hosting.com/free-hosti ... rking.html | Forgot cPanel password - x10Hosting Fo @ http://forums.x10hosting.com/free-hosti ... sword.html | cPanel
[2:33pm] <sp33chy> password reset - Page 2 - x10Ho @ http://forums.x10hosting.com/server-mov ... set-2.html
I have mine set to 4, try a !help google and see what your bot says, in my case it's like below, and my seperator is |.
<speechles> !help google
-sp33chy- --> Bot triggers available:
-sp33chy- !g,!google [.google.country.code] [define:|spell:|movie:] <search terms> <1+1> <1 cm in ft> <patent ##> <weather city|zip> <??? airport> with 4 results.
r
rpope904
Voice
Posts: 16
Joined: Sat Feb 02, 2008 7:41 pm

Post by rpope904 »

ok, cool.. One more small thing, how can I eliminate the need for the site:forums.x10hosting.com and make it just !g <search string> and still search just that site?


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

Post by speechles »

rpope904 wrote:ok, cool.. One more small thing, how can I eliminate the need for the site:forums.x10hosting.com and make it just !g <search string> and still search just that site?


Thanks again. :)

Code: Select all

        if {[string match "movie:*" $input] == 1} {
          regsub -nocase -- {^movie:} $input {} input
          set query "http://www.google.${country}/movies/reviews?q=${input}&btnG=Search%20Movies"
        } else {
          set query "http://www.google.${country}/search?q=${input}&safe=${incith::google::safe_search}&btnG=Search&lr=lang_${incith::google::language}&num=10"
        }
You want to change the search query, not the movie query. Simply change the query like below to embed any elements. This will force all queries to use the site:forums.x10hosting.com because the query is embedded with +site%3Aforums.x10hosting.com

Code: Select all

        } else {
          set query "http://www.google.${country}/search?q=${input}+site%3Aforums.x10hosting.com&safe=${incith::google::safe_search}&btnG=Search&lr=lang_${incith::google::language}&num=10"
        }

##NoWordWrap################################################################################################################################################################################
Understand? :wink:

Important to note: You may notice with this method of embedding that certain functions, such as: calculator, define, conversions, etc aren't working properly. Mostly all of the google features (think bells and whistles) will be unaccessible in this regard.
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

This is just a small update to address problems with did_you_mean messaging (not all worked, and not all used same formatting). I've now gone through and corrected this, as well as added more sites which also support this. A small sample is found below.
<speechles> !t fturama
<sp33chy> No results for fturama. Did you mean: futurama?
<speechles> !e ferraari
<sp33chy> Did you mean...ferrari ? (7781 items). 0 items found for: ferraari
<speechles> !book eggdrip
<sp33chy> Did you mean: eggdrop? Your search - eggdrip - did not match any documents.
<speechles> !group .es eggdrips
<sp33chy> Quizás quisiste decir: eggdrops? Tu búsqueda, eggdrips, no obtuvo ningún documento.
<speechles> !blog .de eggdrip
<sp33chy> Meinten Sie: eggdrop? Es wurden keine mit Ihrer Suchanfrage - eggdrip - übereinstimmenden Dokumente gefunden.
<speechles> !yt .fr eggdrip
<sp33chy> Essayez avec cette orthographe : eggdrop? Aucune vidéo ne correspond à "eggdrip"
All Google sites (search,image,group,news,local,book,video,blog) will use a similar style of did you mean, and only google search will include them in the actual results. This is intentional.

You can get the update HERE or in the first post of this thread.

Realize as well how often or accurate this "did you mean" appears is up to each invididual site, not a limitation of this script.
k
kemenyan
Voice
Posts: 1
Joined: Fri Feb 15, 2008 9:00 am

Post by kemenyan »

i am new in eggdrop, i am in dal.net networks..
i have installed tcl 8.4 in my bash shell acc, but somehow still didnt work :(
please help me..
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 »

kemenyan wrote:i am new in eggdrop, i am in dal.net networks..
i have installed tcl 8.4 in my bash shell acc, but somehow still didnt work :(
please help me..
thanks..

Code: Select all

# BASIC USEAGE GUIDE:.......................................... #
#                                                               #
#   .chanset #channel +google                                   #
To enable the script you must do 2 things.
1) it must be sourced in your eggdrop.conf, loaded with your config changes.
2) you must enable +google (.chanset #yourchan +google)
I'm guessing you probably haven't done step 2. :wink:
<Kemenyan> good evening bro...
<Kemenyan> if u dont mind, i wanna ask about incith:google setup :d
<Kemenyan> ok.. sorry for bothering.. i will ask in egghelp forum... :D
<Kemenyan> many thanks & hope GBU always..
It isn't a bother, its just that at 2:05am when you left that message I wasn't awake.. heh.. If you had idled in the channel, I would've given you a direct reply there instead. :lol:
t
testebr
Halfop
Posts: 86
Joined: Thu Dec 01, 2005 12:22 pm

Post by testebr »

Can you add the 'google score' from here http://forum.egghelp.org/viewtopic.php?t=11080 to your tcl?

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

Post by speechles »

testebr wrote:Can you add the 'google score' from here http://forum.egghelp.org/viewtopic.php?t=11080 to your tcl?

Thank you!
This of course would be simple to add.. but do we really need it?? Would it ever be useful or used in your channel to any extent??

Using !google link:www.yourweb.com is basically doing just that. Not to mention allowing for country switching allows you to check this 'google score' on any of google's servers.
For example, !google .fr link:www.frenchsite.fr, !google .nl link:www.dutch.nl
You can also use googlefight to compare these scores !fight link:www.yourweb.com vs link:www.theirweb.com.

It would be simple to add two more triggers that will basically prepend link: to input, !score and !scorefight, but really all this would do is what !google and !fight can already do themselves.. very redundant.. but if enough people want it, I could be persuaded.. keke :wink:
<speechles> !g .fr link:www.frenchpoodles.fr
<sp33chy> Les termes de recherche spécifiés - link:www.frenchpoodles.fr – ne correspondent à aucun document.
<speechles> !fight link:www.yourweb.com vs link:www.theirweb.com
<sp33chy> By results on google: link:www.yourweb.com beats link:www.theirweb.com by 241 to 0!
fight of course has no country switch (as of yet). It's replies are script generated (in english only), not dynamically read from the webpage. Soon I will have !fight multi-language using the same tokenizing method as !ebay.
B
BeBoo
Halfop
Posts: 42
Joined: Wed Sep 26, 2007 1:44 am

Post by BeBoo »

hey, speechles. Found another bug for ya.
!g 4^2(64^(1/8))
got this in DCC:
Tcl error [incith::google::public_message]: can't read "state(status)": no such variable
Also, wanted to ask ya. What net/chan do you idle in? :-)

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 »

BeBoo wrote:hey, speechles. Found another bug for ya.
!g 4^2(64^(1/8))
got this in DCC:
Tcl error [incith::google::public_message]: can't read "state(status)": no such variable
Thanks!
<speechles> !g 4^2(64^(1/8))
<sp33chy> (4^2) * (64^(1 / 8)) = 26.9086853
Reget the script? v1.9.8a
...and I assume this has something to do with http package since this script doesn't make use of the state array. Try using this http package, I know it works :).
BeBoo wrote:Also, wanted to ask ya. What net/chan do you idle in? :-)

Code: Select all

# ..Unofficially:                                               #
# Copyleft (C) 2006-2008, Speechless                            #
# v1.9.8a - Feb 14th, 2oo8 - speechles <#roms-isos@efnet>       #
#---------------------------------------------------------------#
The header of the script has this contact info... :lol:
B
BeBoo
Halfop
Posts: 42
Joined: Wed Sep 26, 2007 1:44 am

Post by BeBoo »

I updated to the latest version and it works. Thanks :-)
Post Reply