egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

UNOFFICIAL incith-google 2.1x (Nov30,2o12)
Goto page Previous  1, 2, 3 ... 11, 12, 13 ... 56, 57, 58  Next
 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases
View previous topic :: View next topic  
Author Message
speechles
Revered One


Joined: 26 Aug 2006
Posts: 1398
Location: emerald triangle, california (coastal redwoods)

PostPosted: Sat Feb 02, 2008 10:36 pm    Post subject: Reply with quote

@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.. Wink

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. Very Happy

.: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.
Quote:
<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/archives/2006/02/die_press_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.cgi?f=/g/a/2007/11/28/notes112807.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:
#---> 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

Quote:
<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 Razz
Back to top
View user's profile Send private message
elisca
Halfop


Joined: 27 Jan 2007
Posts: 65
Location: in the middle of nowhere

PostPosted: Wed Feb 06, 2008 10:20 am    Post subject: Reply with quote

Quote:
<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/worldcups/200506/bobskele/results/resultbobwomen.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 Embarassed
Back to top
View user's profile Send private message
speechles
Revered One


Joined: 26 Aug 2006
Posts: 1398
Location: emerald triangle, california (coastal redwoods)

PostPosted: Wed Feb 06, 2008 5:34 pm    Post subject: Reply with quote

elisca wrote:
Quote:
<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/worldcups/200506/bobskele/results/resultbobwomen.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 Embarassed

FIX?!! There is nothing to fix, it is mirroring google... Rolling Eyes
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...
Quote:
<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.
Quote:
<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_Park_Boys#If_I_Can.27t_Smoke_and_Swear_I.27m_Fucked [2 Redirect(s)]

Same v1.9.8 link anywhere above contains this fix. enjoyz Wink
Back to top
View user's profile Send private message
rpope904
Voice


Joined: 02 Feb 2008
Posts: 16

PostPosted: Tue Feb 12, 2008 5:42 pm    Post subject: Reply with quote

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-move-issues/48963-cpanel-password-reset-2.html
Back to top
View user's profile Send private message
speechles
Revered One


Joined: 26 Aug 2006
Posts: 1398
Location: emerald triangle, california (coastal redwoods)

PostPosted: Tue Feb 12, 2008 6:37 pm    Post subject: Reply with quote

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-move-issues/48963-cpanel-password-reset-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.
Quote:
<speechles> !g site:forums.x10hosting.com cpanel password
[2:33pm] <sp33chy> 983 Results | cPanel password reset - x10Hosting For @ http://forums.x10hosting.com/server-move-issues/48963-cpanel-password-reset.html | cPanel Password not working - x10Hosti @ http://forums.x10hosting.com/free-hosting/51015-cpanel-password-not-working.html | Forgot cPanel password - x10Hosting Fo @ http://forums.x10hosting.com/free-hosting/50965-forgot-cpanel-password.html | cPanel
[2:33pm] <sp33chy> password reset - Page 2 - x10Ho @ http://forums.x10hosting.com/server-move-issues/48963-cpanel-password-reset-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 |.
Quote:
<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.
Back to top
View user's profile Send private message
rpope904
Voice


Joined: 02 Feb 2008
Posts: 16

PostPosted: Tue Feb 12, 2008 9:06 pm    Post subject: Reply with quote

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. :)
Back to top
View user's profile Send private message
speechles
Revered One


Joined: 26 Aug 2006
Posts: 1398
Location: emerald triangle, california (coastal redwoods)

PostPosted: Tue Feb 12, 2008 11:36 pm    Post subject: Reply with quote

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. Smile
Code:
        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:
        } 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.
Back to top
View user's profile Send private message
speechles
Revered One


Joined: 26 Aug 2006
Posts: 1398
Location: emerald triangle, california (coastal redwoods)

PostPosted: Thu Feb 14, 2008 4:55 pm    Post subject: Reply with quote

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.
Quote:
<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.
Back to top
View user's profile Send private message
kemenyan
Voice


Joined: 15 Feb 2008
Posts: 1

PostPosted: Fri Feb 15, 2008 9:07 am    Post subject: Reply with quote

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 Sad
please help me..
thanks..
Back to top
View user's profile Send private message
speechles
Revered One


Joined: 26 Aug 2006
Posts: 1398
Location: emerald triangle, california (coastal redwoods)

PostPosted: Fri Feb 15, 2008 11:26 pm    Post subject: Reply with quote

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 Sad
please help me..
thanks..
Code:
# 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

Quote:
<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... Very Happy
<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. Laughing
Back to top
View user's profile Send private message
testebr
Halfop


Joined: 01 Dec 2005
Posts: 86

PostPosted: Tue Feb 19, 2008 9:27 am    Post subject: Reply with quote

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

Thank you!
Back to top
View user's profile Send private message
speechles
Revered One


Joined: 26 Aug 2006
Posts: 1398
Location: emerald triangle, california (coastal redwoods)

PostPosted: Wed Feb 20, 2008 3:41 am    Post subject: Reply with quote

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
Quote:
<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.
Back to top
View user's profile Send private message
BeBoo
Halfop


Joined: 26 Sep 2007
Posts: 42

PostPosted: Wed Feb 20, 2008 10:48 pm    Post subject: Reply with quote

hey, speechles. Found another bug for ya.

Quote:
!g 4^2(64^(1/8))


got this in DCC:

Quote:
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!
Back to top
View user's profile Send private message
speechles
Revered One


Joined: 26 Aug 2006
Posts: 1398
Location: emerald triangle, california (coastal redwoods)

PostPosted: Wed Feb 20, 2008 10:56 pm    Post subject: Reply with quote

BeBoo wrote:
hey, speechles. Found another bug for ya.

Quote:
!g 4^2(64^(1/Cool)


got this in DCC:

Quote:
Tcl error [incith::google::public_message]: can't read "state(status)": no such variable


Thanks!

Quote:
<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 Smile.
BeBoo wrote:
Also, wanted to ask ya. What net/chan do you idle in? Smile
Code:
# ..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... Laughing
Back to top
View user's profile Send private message
BeBoo
Halfop


Joined: 26 Sep 2007
Posts: 42

PostPosted: Wed Feb 20, 2008 11:07 pm    Post subject: Reply with quote

I updated to the latest version and it works. Thanks Smile
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases All times are GMT - 4 Hours
Goto page Previous  1, 2, 3 ... 11, 12, 13 ... 56, 57, 58  Next
Page 12 of 58

 
Jump to:  
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


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber