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 1.8.8g+tommytom

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases
View previous topic :: View next topic  
Author Message
tommytom
Voice


Joined: 09 Sep 2011
Posts: 16

PostPosted: Fri Sep 09, 2011 8:42 am    Post subject: fixes Reply with quote

http://pastebin.com/ePrDhySD

I can't tell what all I have done to it.
I fix things, other things break.
No telling what all is working still.

Today, however, I changed a few things I CAN tell you what I did and what works that I tested.

-Changed the UA to presto (Opera) for testing/future-compatibility reasons (if you don't like Opera, I don't suggest you change it willy-nilly, but instead use Fiddler with the Request Builder using the URL+UA and view the WebView and/or read the source in the program or copy/paste into an editor like notepad++) and the fact that Google now refuses to supply "Lynx" (browser itself or the UA) with the "onebox" special results. No surprise really, because Lynx doesn't show images, but they could have at least gave a text form....
-Modified define: to work with new UA (or maybe it's been broken a while, I dunno), give a working link, and simplified the RegEx (won't break as bad, I presume)
-Fixed the "finance" currency results to return a clickable link and EXTREMELY shorter (build a custom URL instead of take it RAW)
-Fixed image search to work with the DRASTICALLY different source that gets fed to the new UA (it's no longer plain text but a crapload of JS too)
-Weather (and anything with "onebox") has been fixed (several times over the months).

Tested and working:
Weather, define:, spell:, conversions (measurements), currency (finance), image search (might have added !gi, don't recall), google fight

Untested and probably broken:
News, anything with maps (area code, travel), anything not using "onebox" in the category matching (the image URL has changed much over the months, but onebox seems to be the recent/working constant), video (but I think it works), books

Keep in mind that this is a personal script, but with the lynx crap and the source changing when you change the UA, I knew that 100% of the bots using this script are probably broken. So, that said, don't be surprised if you find some hackish fixes in here I never meant to be public or stable. I probably used .*? where I should have use .+?, but it shouldn't be a problem (sorry, I put some REALLY old mods in this thing when I was learning TCL, eggdrop, AND RegEx).

Edit:
The base script is 1.8.8g
I think that's the lastest official release, but I have been adding my own code and never seen any updates, so I just hacked it up how I see fit without checking for updates. Sorry if there is a better base script out there that I could have based my changes on.
Back to top
View user's profile Send private message
Trixar_za
Op


Joined: 18 Nov 2009
Posts: 143
Location: South Africa

PostPosted: Fri Sep 09, 2011 12:23 pm    Post subject: Re: fixes Reply with quote

tommytom wrote:
The base script is 1.8.8g
I think that's the lastest official release, but I have been adding my own code and never seen any updates, so I just hacked it up how I see fit without checking for updates. Sorry if there is a better base script out there that I could have based my changes on.
That's the version done by madwoota and the one you find in the egghelp script repository, but it's NOT the version we're using here. This is the unofficial fork created by speechles and the difference is several features and about 6000 extra lines of code, comments and configuration options. Go to the first page and click the download link for this version Razz
_________________
http://www.trixarian.net/Projects
Back to top
View user's profile Send private message Visit poster's website
speechles
Revered One


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

PostPosted: Fri Sep 09, 2011 12:34 pm    Post subject: Re: fixes Reply with quote

tommytom wrote:
The base script is 1.8.8g
I think that's the lastest official release, but I have been adding my own code and never seen any updates, so I just hacked it up how I see fit without checking for updates. Sorry if there is a better base script out there that I could have based my changes on.


Differences between 1.8.8 and 2.0.0:

Quote:
<speechles> !g .es taco
<sp33chy>92.900.000 resultados | Taco - Wikipedia, la enciclopedia libre @ http://es.wikipedia.org/wiki/Taco | Taco - Wikipedia, the free encyclopedia @ http://en.wikipedia.org/wiki/Taco | Taco Bell - Wikipedia, la enciclopedia libre @ http://es.wikipedia.org/wiki/Taco_Bell

<speechles> !g .fr poodle
<sp33chy> 700 000 résultats | Poodle - Wikipedia, the free encyclopedia @ http://en.wikipedia.org/wiki/Poodle | Images correspondant à poodle | Loulou Poodle - Éleveur du caniche royal @ http://louloupoodle.com/

<speechles> !g .nl amsterdam
<sp33chy> Amsterdam @ http://maps.google.nl/maps?q=amsterdam&layer=c&ll=52.358403,4.881309&cbll=52.358403,4.881309&photoid=po-1164179&z=10&ei=Zj5qTojZNczSiALg0biRDg&sa=X&oi=geocode_result&ct=photo-link&cd=1&resnum=3&ved=0CE0Q8wEoADAC

<speechles> !n .es taco
<sp33chy> 4.160 Resultados | Taco Master, la aplicación más descargada para iPad (PCWorld México - hace 39 minutos) @ http://www.pcworld.com.mx/Articulos/18216.htm | De antojo. Los tacos árabes del Cuadro (El Universal EdoMex - hace 2 horas) @ http://www.eluniversaledomex.mx/tlalnepantla/nota21816.html | Los tacos de La Potosina (El Diario de Coahuila - hace 9 horas) @
<sp33chy> http://www.eldiariodecoahuila.com.mx/notas/2011/9/9/tacos-potosina-252554.asp

<speechles> !n .nl marihuana
<sp33chy>] 4.399 Resultaten | Amerikanen roken meer wiet (Telegraaf.nl - 21 uren geleden) @ http://www.telegraaf.nl/buitenland/10513859/__Amerikanen_roken_meer_wiet__.html?sn=binnenland,buitenland | Bulgaren telen marihuana in plaats van tomaten (AGF.nl - 7 sep. 2011) @ http://www.agf.nl/nieuwsbericht_detail.asp?id=74243 | Vet is verslavend (Knack.be - 7 sep. 2011) @
<sp33chy> http://knack.rnews.be/nl/actualiteit/nieuws/gezondheid/vet-is-verslavend/article-1195099125007.htm


The script below, is the one supported, 1.8.8 hasn't been supported for some time.
Incith:Google v2.0.0c

My fork of the incith-google project allows for people of any language to use the script, and have it output in their natural language. The 1.8.8g version is stuck in one language only. The unofficial version also, supports wikipedia, ebay, gamespot, gamefaqs, etc, etc ... Now while some things within the unofficial are presently broken those will be corrected when I have the time. Until then, if you want to help with the incith-google project, use the currently supported version.. which is the unofficial... Very Happy

PROTIP: The shortcoming...
Code:
      # make sure we have something to send
      if {[info exists output] == 0} {
        set reply "Sorry, no search results were found."
        if {[info exists did_you_mean] == 1} {
          append reply " Did you mean: ${did_you_mean}?"
        }
        return $reply
      }


It's creating it's own "script generated" output using English. So that one language supported, you guessed it.. Only English. This isn't his fault. This is the original way Incith/Madwoota had it. This way is quite limited and annoying for those who aren't english as their first language. See below how it should work when no results are found, or there is a did you mean.
Quote:
<speechles> !g podle
<sp33chy> 664,000,000 results | Did you mean: poodle | podle - Wiktionary @ http://en.wiktionary.org/wiki/podle | Podle's Channel - YouTube @ http://www.youtube.com/user/Podle

<speechles> !g .es teimp
<sp33chy> 66.600 resultados | Quizás quiso decir: tiempo | L'ERMINIA TEIMP ANDREE - Pierangelo Bertoli (letra) @ http://letras.terra.com/pierangelo-bertoli/1086339/ | Pau Ke Teimp | Facebook @ http://es-la.facebook.com/people/Pau-Ke-Teimp/589311781

<speechles> !g .nl jhasjd98892390840234
<sp33chy> Geen standaard-webpagina's met al uw zoektermen gevonden. Uw zoekbewerking - jhasjd98892390840234 - heeft geen overeenkomstige documenten opgeleverd.


Top two up there contain "did you mean". Notice the one in Spanish? Notice as well the "no results" message in full Dutch. Displaying "exactly" as it would on google. This is how it should be done.

Therefore, the fixes created to fix the "one boxes" within 1.8.8 will not work for the unofficial 2.0.0 version I have. The scraping templates cannot be bound to English words found in text. They change when you change languages. They must be framed around html elements that build the page. These remain the same no matter which language is used. This is much harder to accomplish and have it work in any language. Call it challenging.. Wink
_________________
speechles' eggdrop tcl archive


Last edited by speechles on Fri Sep 09, 2011 1:40 pm; edited 3 times in total
Back to top
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Fri Sep 09, 2011 1:15 pm    Post subject: Reply with quote

Moderated: These posts have been split from the thread UNOFFICIAL incith-google 2.0.0c (Sep9,2o11)
as this is a fork of incith-google 1.8.8g, and not Speechles' fork.

/NML_375
_________________
NML_375, idling at #eggdrop@IrcNET
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
Page 1 of 1

 
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