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 »

<speechles> !g whois egghelp.org
<sp33chy> 1,040 Results | Whois record for egghelp.org (Created on Apr. 23, 1999 and Expires on Apr. 23, 2009) @ http://whois.domaintools.com/egghelp.org | egghelp.org community :: View topic - @ http://forum.egghelp.org/viewtopic.php?t=10837 | egghelp.org community :: View topic - @ http://forum.egghelp.org/viewtopic.php? ... &view=next | egghelp.org: eggdrop command reference @
<sp33chy> http://www.egghelp.org/commands/irc.htm

<speechles> !v ftruama
<sp33chy> Did you mean: futurama? Your search - ftruama did not return any results.

<speechles> !v .nl futurama duration:long
<sp33chy> 491 Resultaten | FUTURAMA - Un Ciclope A La Medida (23 min - 2 jan. 2008) @ http://video.google.nl/videoplay?docid= ... 9646535877 | Futurama - Fry and the Slum Factory (22 min) @ http://video.google.nl/videoplay?docid= ... 4504309682 | {Ô.futurama.2x09 a bicyclops built for (22 min - 20 nov. 2007) @ http://video.google.nl/videoplay?docid= ... 2558243131 | Futurama - The series
<sp33chy> has landed (22 min) @ http://video.google.nl/videoplay?docid= ... 8229380098
Corrected the issue with google recently changing the format of it's video.google.* template. Also added the additional info line from google 'whois' searches (as requested). Enjoy, get the new script HERE or at the v1.9.8c link on the first page of this thread. Most important to remember, have a fun!! :)

*** Note: On my end (for me with default settings and for a few friends with different languages who beta test for me on different platforms) everything works perfectly as intended. if you experience problems or issues of any sort regarding settings of your config variables. Keep in mind it cannot be resolved unless you make an issue of it here by posting.. thanks ;)
t
trifase
Voice
Posts: 1
Joined: Thu May 01, 2008 6:43 pm

Post by trifase »

<@Trifase> !g 2+2
<HAL> 2 + 2 = 4
<@Trifase> !g 15 usd in eur
<HAL> 1,510,000 Results | 15 U.S. dollars = 9.7093663 Euros | Euro to U.S. Dollar Exchange Rate - Ya @ http://finance.yahoo.com/currency/conve ... it=Convert | U.S. Dollar to Euro Exchange Rate - Ya @ http://finance.yahoo.com/currency/conve ... it=Convert | ECB: Euro exchange rates USD 30 Apri @
<HAL> http://www.ecb.eu/stats/exchange/eurofx ... sd.en.html
Standard setting.
I wondering why the eggdrop some days ago didnt show search result for conversation, only value. Now not, i think google changed something.

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

Post by speechles »

trifase wrote:
<@Trifase> !g 2+2
<HAL> 2 + 2 = 4
<@Trifase> !g 15 usd in eur
<HAL> 1,510,000 Results | 15 U.S. dollars = 9.7093663 Euros | Euro to U.S. Dollar Exchange Rate - Ya @ http://finance.yahoo.com/currency/conve ... it=Convert | U.S. Dollar to Euro Exchange Rate - Ya @ http://finance.yahoo.com/currency/conve ... it=Convert | ECB: Euro exchange rates USD 30 Apri @
<HAL> http://www.ecb.eu/stats/exchange/eurofx ... sd.en.html
Standard setting.
I wondering why the eggdrop some days ago didnt show search result for conversation, only value. Now not, i think google changed something.

sry for bad english :(
That is 100% normal behavior mirroring google exactly. 2 + 2 only has a onebox 'answer' as the result (proof needed? click here.), so the script will merely display just that result. While 15 usd in eur has numerous results, not just a single onebox 'answer' so the script displays those results accordingly (proof needed? click here.). What is the problem?

Edit: minor update, concerning mainly google define: links and correctly handling encodings of them. No new version number, 1.9.8c links updated, date of may 1st comfirms you have latest copy.. enjoy ;)
c
compengi
Voice
Posts: 1
Joined: Sat May 03, 2008 6:31 pm

Post by compengi »

I'm using the latest incith script. but i found a problem with myspace's search. When trying to search someone you receive Tcl error [incith::google::public_message]: can't read "reply": no such variable. I hope you are familiar with such issue.
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

compengi wrote:I'm using the latest incith script. but i found a problem with myspace's search. When trying to search someone you receive Tcl error [incith::google::public_message]: can't read "reply": no such variable. I hope you are familiar with such issue.
Wow, after a talk with compengi on irc I've found out myspace uses ip location to determine html delivery. So if your using a french ip location to browse myspace, they conveniently give you french text. The same is true for any location. Of this I wasn't aware and parts of the myspace parsers were embedded with english words. This of course will only work with english ip locations. So to make a long story even longer, the problem has been solved. You can now use myspace from any ip location and get the same standard behavior. Get the new script here or the v1.9.8d link from the first post of this thread.
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

Google video as of recent has been going thru vast template redesigns, and as a result so has this script. Welcome to the newest edition of this template, and hopefully they stick with it for awhile. Get the new script on the first post of this thread v1.9.8e and check below for a sample output (yes, still multi-language ;))
<speechles> !v .fr eiffel
<sp33chy> 21916 Résultats | Eiffel 65 - Blue (3 mn -16 nov. 2006 - (16 271 avis)) @ http://www.youtube.com/watch?v=mL2UsAbI1hg | Eiffel 65 - Move Your Body (3 mn -25 févr. 2006 - (3 648 avis)) @ http://www.youtube.com/watch?v=zdecGFSJ_eQ | Im Blue Eiffel 65 (4 mn -19 mai 2006 - (7 403 avis)) @ http://www.youtube.com/watch?v=emM_juVdzds | Eiffel te revoir (4 mn -9 févr. 2007 - (1 avis)) @
<sp33chy> http://video.google.fr/videoplay?docid= ... 7649422878
<speechles> !v .ca south park duration:long
<sp33chy> 2297 Results | Charlie Rose - "South Park" / Smith (56 min -Aug 27, 2007 - (214 Ratings)) @ http://www.youtube.com/watch?v=VqtLudQtIGs | South Park "Trapped In The Closet" (21 min -Sep 9, 2007 - (367 Ratings)) @ http://jumpcut.com/view/?id=53CBC094D74 ... 0423CF4092 | south park (20 min -Feb 24, 2008 - (1 Rating)) @ http://crackle.com/c/Funny/south_park/2193603 | South Park ABF`s (21 min -Jun
<sp33chy> 9, 2007 - (26 Ratings)) @ http://video.google.ca/videoplay?docid= ... 3338086425
User avatar
Domin
Halfop
Posts: 72
Joined: Sat Jun 10, 2006 9:10 am

Post by Domin »

Thanks for a greate script ;-)

Wouldt it be possible to include this page as a search page?

http://www.chickipedia.com/
Regards
Domin @ efnet
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

Domin wrote:Thanks for a greate script ;-)

Wouldt it be possible to include this page as a search page?

http://www.chickipedia.com/
To support this would be quite simple as it's run by mediawiki software. It appears they simply use a non-custom php search index, not everything is custom templated (meaning simply altering the query string engine would support this).
<speechles> !wm .www.chickipedia.com ass and titties
<sp33chy> [19:28] Tcl error [incith::google::public_message]: couldn't open socket: host is unreachable
This is what you get at the moment if you have wikimedia attempt to scrape it. Obvious that is a simple query string problem. The parser routines within wikimedia are robust with many fallback catches. This will help it easily work even though the pages are cluttered with images and tables. I've scripted routines (cruft-cutters) to handle all these and keep them from being seen on irc already. Expect this to make it in the next version and within the mediawiki engine. All you need to do after that is set your wikimedia default site as it, and there you go... :)
a
avggeek
Voice
Posts: 12
Joined: Thu Apr 03, 2008 12:10 am
Location: Singapore

Post by avggeek »

Hi,

Been having some trouble getting 1.98e to work. Any time I activate the script, the bot crashes. Trying to relaunch the bot gives the following error:

Code: Select all

[23:08:39] Tcl error in file 'bot.conf':
[23:08:39] missing close-brace: possible unbalanced brace in comment
    while executing
"namespace eval incith {
  namespace eval google {
    # GOOGLE
    # performs a search on google.
    #
    proc google {input} {
      # local variab..."
    (file "scripts/incith-google-v1.98e.tcl" line 816)
    invoked from within
"source scripts/incith-google-v1.98e.tcl"
    (file "bot.conf" line 1376)
[23:08:39] * CONFIG FILE NOT LOADED (NOT FOUND, OR ERROR)
I tried doing some bracket-matching using a Text Editor but didn't get very far.

I have not downloaded 1.98e before so I don't believe there is a caching issue.

Please let me know if you need any other info.
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

[22:41] Last Spoke tracker by Pistos -- loaded.
[22:41] - UNOFFICIAL incith:google-1.9.8e loaded.
[22:41] WorldTime v1.3 by Murf (modified by LOQUILLO_/updated by speechles) loaded
[22:41] - incith:gamertag-1.2 loaded.
[22:41] - incith:friendscode-1.0 loaded.
[22:41] - incith:steam-1.0 loaded.
[22:41] Userfile loaded, unpacking...
[22:41] === sp33chy: 10 channels, 39 users.
Launched into the background (pid: 2068)
You must be causing this by editing the script with something mangling encodings. Use Wordpad, not notepad, if your on a windows platform.
a
avggeek
Voice
Posts: 12
Joined: Thu Apr 03, 2008 12:10 am
Location: Singapore

Post by avggeek »

speechles wrote: You must be causing this by editing the script with something mangling encodings. Use Wordpad, not notepad, if your on a windows platform.
Carefully picking apart the whole process shows I got screwed twice by file caching - once when downloading via the browser and once again when FTPing using a socks proxy.


Switching a non default browser (IE...) gave me a slightly diff. file size than earlier (269.75kb seems to be correct filesize). FTPing using a socks proxy resulted in an incomplete file getting uploaded, so I switched to a direct FTP which cured that problem.

Once I did that, the bot rehashed successfully - apologies.

PS: Would it be possible for you to include the right filesize when you update versions - that would help folks like me who get caught with slightly incomplete versions spot the problem rightaway.
R
Renegade
Voice
Posts: 10
Joined: Sat May 24, 2008 12:40 am

Post by Renegade »

First of all, speechless, thank you very, very much for the work you're doing - I love the script :D

However, the reason I've finally registered and am posting now is a problem I've run into - I've upgraded from 1.9.8c to 1.9.8e a day ago, and today, one of the users in the channel realized that google-based conversion does not work anymore.

Normal google queries work fine, but google queries such as "!google five degrees celsius to fahrenheit", "!google 5 euros in dollars" or "!google 3 liters to cups" return the following message in the partyline:

Code: Select all

 Tcl error [incith::google::public_message]: can't read "desc": no such variable
All I did was transfer my configuration settings from the old to the new version - I didn't touch the "real" code. So I have no idea how I could've broken it. I did a search for "variable desc", and there is no such declaration in either file - so I'm pretty sure I didn't damage one.

Can anyone verify this problem and/or tell me what is wrong? I'm running the script on Windrop v1.6.19, and this is the only problem I've encountered with this version of the script so far.





Independent from that, if it is not too impudent to ask, I'd have three requests for feature additions, if that's possible:
  1. Search-term blacklist. The script is mainly running in a PG-13 channel, and we've had users who'd do drive-bys purely consisting of joining, doing "!wiki anal sex" and then leaving. I have safe search on for google, but for one, that isn't always 100% working, and for two, that obviously does nothing for wikipedia. Would it be possible to implement a variable where I could provide a list of search terms that are either simply ignored, or block the query as a whole from execution?
  2. UrbanDictionary search. The kids of today speak in weird tongues. :? Search url is

    Code: Select all

    http://www.urbandictionary.com/define.php?term=Variable+Variable2

    The results end up in a table, in which there are <div class="definition"> which include the definition texts.
  3. phpBB search. The same community has a forum, and it'd be cool if we could search it with the same script.

    Code: Select all

    (forum url)/search.php?keywords=Variable1+Variable2&sr=topics
    ...is the search query format; the result returns an unordered list with each list item including a definition list, which ultimately ends in an <a class="topictitle" ...>, which includes the thread url and title.
If you don't want to do it, just say so and I'll try to hack one of the other searches to build it myself. You just know how the script works better than I do.

Anyway, thanks a lot for your hard work, and please keep going :)
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 fixes the problem with calculations/conversions/etc
http://ereader.kiczek.com/incith-google-v1.98e.tcl 269 KB (276,224 bytes)
If problems persist, clear your web cache and reget this file. There is no version update for this fix since it was simplistic.

The problem is google changed their template layout for these and when fixing this script to produce output again the method can be directly applied back to the google script. So the short answer is yay, it works again, everything!

For google safe_search anamolies, I will need to check all google related site queries. There may be spots where I've removed this (for debugging purposes) and forgot to put it back in. I'm thinking video may allow sexual nature even with safe_search on because of this (to debug some sections the query line is temporarily changed). Over this coming weekend I will make the safe_search fully compliant on ALL google related sites (including youtube), to address that very issue.

Now about the safe search for wikipedia... This would be difficult, as the script does not use wikipedia's API engine to read the site. The reason it doesn't is because they set limitations on how often one can use this API. The urban dictionary search would be simple to implement but I haven't done so because these types of scripts already exist. To rewrite one of my own would invariably take heat from the other's fire so to speak. In the same way this script takes from the original google script, regrettably. The same can be said for PHPBB search, many wonderful authors have already provided excellent stand alone versions for this. To address your flyby nasty spammers, If you can think of some way to properly "safe search" wikipedia realizing there is no API, I'd love to hear it...heh

Code: Select all

set query "http://${country}.wikipedia.org/wiki/index.php?title=Special%3ASearch&search=${input}&fulltext=Search"
At present this is how the script makes contact with wikipedia initially. The html given in reply is then parsed to finally arrive at the given destination page, which is then scraped and displayed to irc. In the initial query string, I haven't found a solution to 'safe_search'. A solution might be as simple as a 'banned' word list and the entire engine can see if any user attempts to query using these "banned" words and take appropriate action if so (meaning tell them 'don't be nasty!', etc). But the difficulty ramps up exponentially coupled with the open endedness (multiple languages) of this script, so setting such limitations is difficult as each language potentially has it's own vocabulary of "banned" words (think thousands upon thousands). I do not see an easy way to accomplish this at all as once users realize the english word f**k (uc being the wildcarded letters) is banned, they will try every other language imagineable until they succeed. It isn't a failing of the script either. It's an unfortunate failing of humanity. Humans like to be nasty, often. :?
M
MellowB
Voice
Posts: 24
Joined: Wed Jan 23, 2008 6:02 am
Location: Germany
Contact:

Post by MellowB »

speechles wrote:
<speechles> !wm .www.chickipedia.com ass and titties
<sp33chy> [19:28] Tcl error [incith::google::public_message]: couldn't open socket: host is unreachable
This is what you get at the moment if you have wikimedia attempt to scrape it. Obvious that is a simple query string problem. The parser routines within wikimedia are robust with many fallback catches. This will help it easily work even though the pages are cluttered with images and tables. I've scripted routines (cruft-cutters) to handle all these and keep them from being seen on irc already. Expect this to make it in the next version and within the mediawiki engine. All you need to do after that is set your wikimedia default site as it, and there you go... :)
Thats pretty cool, didnt know that this would work!
Now I finally can access some other wiki in my channel, nice work!
But one problem with the !wm trigger, it seems that it does not use the encoding conversion lookups, does it? I'm accessing some wiki which has lots of japanese in it with the !wm trigger now and some of it just appears pretty screwed up, plastering lots of the output with underline codes and stuff. If you could get the !wm trigger to use the conversion lookups too that would be pretty nice. :)

Also, another request which would be kinda huge but google has also its own nice translation service. I know, there are already scripts for the eggdrop that use babelfish but i think the google translation service is much more advanced and also has a bunch of translation pairs more than other services. Also with your support of unicode in the script this could truly be wonderful. So yeah, if its not too much work for you it would be great if you could think about adding this to your script. ^^

Beside that, thanks a bunch for all the hard work you put in it so far, it is sure one of the most used scripts with my bot.
On the keyboard of life, always keep one finger on the ESC key.
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

MellowB wrote:
speechles wrote:
<speechles> !wm .www.chickipedia.com ass and titties
<sp33chy> [19:28] Tcl error [incith::google::public_message]: couldn't open socket: host is unreachable
This is what you get at the moment if you have wikimedia attempt to scrape it. Obvious that is a simple query string problem. The parser routines within wikimedia are robust with many fallback catches. This will help it easily work even though the pages are cluttered with images and tables. I've scripted routines (cruft-cutters) to handle all these and keep them from being seen on irc already. Expect this to make it in the next version and within the mediawiki engine. All you need to do after that is set your wikimedia default site as it, and there you go... :)
Thats pretty cool, didnt know that this would work!
Now I finally can access some other wiki in my channel, nice work!
But one problem with the !wm trigger, it seems that it does not use the encoding conversion lookups, does it? I'm accessing some wiki which has lots of japanese in it with the !wm trigger now and some of it just appears pretty screwed up, plastering lots of the output with underline codes and stuff. If you could get the !wm trigger to use the conversion lookups too that would be pretty nice. :)
This should work... The problem with adding wikimedia sites, is the entire site becomes your 'country'. So to add say, 'thissite.com/wiki' to the encode strings with utf-8 encoding is as simple as adding the below to encode_strings:
thissite.com/wiki:utf-8
MellowB wrote:Also, another request which would be kinda huge but google has also its own nice translation service. I know, there are already scripts for the eggdrop that use babelfish but i think the google translation service is much more advanced and also has a bunch of translation pairs more than other services.
You will be suprised to know, it already does this. You have !translate (google's version of it) included with this script. Type !help translate in a channel where the script is running.
<speechles> !help translate
-sp33chy- --> Bot triggers available:
-sp33chy- !tr,!trans,!translate region@region <text> with 1 results.
<speechles> !tr en@fr hello france, this is english translated to french.
<sp33chy> Google says: (en->fr) bonjour la France, c'est Anglais traduit en français.
MellowB wrote: Also with your support of unicode in the script this could truly be wonderful. So yeah, if its not too much work for you it would be great if you could think about adding this to your script. ^^

Beside that, thanks a bunch for all the hard work you put in it so far, it is sure one of the most used scripts with my bot.
It's also I'm sure one of the most abused, but with something so versatile people occasionally find it whimsical everything it can do. Sure does make time on IRC less boring, I agree. ;)
Post Reply