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

Support & discussion of released scripts, and announcements of new releases.
Post Reply
t
tommytom
Voice
Posts: 16
Joined: Fri Sep 09, 2011 8:28 am

fixes

Post by tommytom »

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.
User avatar
Trixar_za
Op
Posts: 143
Joined: Wed Nov 18, 2009 1:44 pm
Location: South Africa
Contact:

Re: fixes

Post by Trixar_za »

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 :P
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Re: fixes

Post by speechles »

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:
<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& ... 0Q8wEoADAC

<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/tlalnep ... 21816.html | Los tacos de La Potosina (El Diario de Coahuila - hace 9 horas) @
<sp33chy> http://www.eldiariodecoahuila.com.mx/no ... 252554.asp

<speechles> !n .nl marihuana
<sp33chy>] 4.399 Resultaten | Amerikanen roken meer wiet (Telegraaf.nl - 21 uren geleden) @ http://www.telegraaf.nl/buitenland/1051 ... 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/ni ... 125007.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... :D

PROTIP: The shortcoming...

Code: Select all

      # 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.
<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.. ;)
Last edited by speechles on Fri Sep 09, 2011 1:40 pm, edited 3 times in total.
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

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
Post Reply