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
Fire-Fox
Master
Posts: 299
Joined: Sat Sep 23, 2006 9:01 pm
Location: /dev/null

Post by Fire-Fox »

Hey

Your right :D But both works :) (But witch is the best)
GreatZ
Fire-Fox | Denmark

Scripts: Relay | Store Text | TvMaze
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

Fire-Fox wrote:Hey

Your right :D But both works :) (But witch is the best)
The best would be the way the script does it natively, using the *_prepend strings. The reason it is better is because it does the prepending during the line split procedure. This means all lines of the output will contain the prepend.

The way you've approached it, your prepending to the output before the line-split occurs. The problem with this is only the first line will contain the prepend. The rest of the lines will be shown without one.
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

Also forgot to mention and hit the stupid reply button instead of edit, my bad (why this forum itself smart enough to auto-merge subsequent posts by the same user is beyond me.. but we aren't discussing that at the moment..heh). But the major difference is your prepending to the results message directly. If no results are found, yours will not be a prepend, but simply the "no results found" messge. The navtive method the script uses will always add a prepend to each line, and is why they are originally set as nulls "" because this behavior is omni-present to all messages given by each trigger.
User avatar
Fire-Fox
Master
Posts: 299
Joined: Sat Sep 23, 2006 9:01 pm
Location: /dev/null

Post by Fire-Fox »

Your right. I have chance it to use the one allready in the script :)
GreatZ
Fire-Fox | Denmark

Scripts: Relay | Store Text | TvMaze
N
Nextron
Voice
Posts: 2
Joined: Fri Feb 06, 2009 3:55 pm

Post by Nextron »

Ah disregard what I said before.

Anyway I tried to download the latest script from..
http://ereader.kiczek.com/incith-google-v1.99c.tcl
And it merely 404's on me.
Anyone happen to have another link to download it from?
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 »

Nextron wrote:Ah disregard what I said before.

Anyway I tried to download the latest script from..
http://ereader.kiczek.com/incith-google-v1.99c.tcl
And it merely 404's on me.
Anyone happen to have another link to download it from?
Thanks!
Seems my webhost had a problem, and they seem to have cached the contents of my site and reloaded it all. Their cache is sadly outdated, so I've tried to replace all the files that were added since their last cache back again. Retrying the links should meet with success now, not a static 404 message.

Incith:Google v1.9.9c
N
Nextron
Voice
Posts: 2
Joined: Fri Feb 06, 2009 3:55 pm

Post by Nextron »

speechles wrote:Seems my webhost had a problem, and they seem to have cached the contents of my site and reloaded it all. Their cache is sadly outdated, so I've tried to replace all the files that were added since their last cache back again. Retrying the links should meet with success now, not a static 404 message.

Incith:Google v1.9.9c
Thank you very much my good sir :D
x
x0x
Op
Posts: 140
Joined: Tue Feb 10, 2009 6:42 am

Post by x0x »

What a great script! I'm running into one small issue however.

When I do !google rihanna for example, it prints;

<@ME> !google rihanna
<@Bot> News results for rihanna @ http://news.google.com/news?q=rihanna
<@Bot> Rihanna - Wikipedia, the free encyc @ http://en.wikipedia.org/wiki/Rihanna
<@Bot> Rihanna Reloaded @ http://www.rihannanow.com/
<@Bot> Rihanna official website @ defjam.c @ http://www.defjam.com/site/artist_home. ... ist_id=586
<@Bot> Image results for rihanna @ http://images.google.com/images?q=rihanna

How do I remove those Image and News results? I want plain search results.
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

lmao.. great script it is, but most of the praise should be incith's (and to some extent madwoota's as well) since his (their) script is used as the foundation (and is why this script keeps both names intact) to enable all of those extra abilities.

Now about your problem, the answer is complex. Should the script mimic verbatim or should we begin to tailor things... Mostly, I chose to keep the good, the bad, and the ugly and most if not everything is verbatim, no results are missed if at all possible. Every result shows, minus of course the ads google injects. This is intuitive as it mirrors the exact behavior as using a browser and visiting the site itself. People have asked before for what your asking, so as a compromise I can add a variable to the config in the next version to over-ride these subsequent results and give just the "answer" (this will also strip the "XXX results" messages as well when giving the "answer"). Once something breaks, expect to see "ShortAnswers" as a config option... :lol:
x
x0x
Op
Posts: 140
Joined: Tue Feb 10, 2009 6:42 am

Post by x0x »

speechles wrote:lmao.. great script it is, but most of the praise should be incith's (and to some extent madwoota's as well) since his (their) script is used as the foundation (and is why this script keeps both names intact) to enable all of those extra abilities.

Now about your problem, the answer is complex. Should the script mimic verbatim or should we begin to tailor things... Mostly, I chose to keep the good, the bad, and the ugly and most if not everything is verbatim, no results are missed if at all possible. Every result shows, minus of course the ads google injects. This is intuitive as it mirrors the exact behavior as using a browser and visiting the site itself. People have asked before for what your asking, so as a compromise I can add a variable to the config in the next version to over-ride these subsequent results and give just the "answer" (this will also strip the "XXX results" messages as well when giving the "answer"). Once something breaks, expect to see "ShortAnswers" as a config option... :lol:
Excellent! Looking forward to it :D

In some situations, you don't want image and news results between the "normal" results so it would be great. Thanks in advance!
A
Alis
Voice
Posts: 1
Joined: Thu Feb 12, 2009 7:15 am

Post by Alis »

I'm trying to use incith-google-v1.99c.tcl, but im getting an error when starting the egg, and would appreciate any help in solving this issue.

Code: Select all

Tcl error in file 'eggy.conf':
can't read "html": no such variable
    while executing
"regexp -- {<div class=med style=".*?"><br>(.+?)<br><br>} $html - no_search"
    (file "scripts/incith-google-v1.99c.tcl" line 1)
    invoked from within
"source scripts/incith-google-v1.99c.tcl"
    (file "eggy.conf" line 207)
* CONFIG FILE NOT LOADED (NOT FOUND, OR ERROR)
Thanks.
e
eggysoldier
Voice
Posts: 7
Joined: Wed Feb 25, 2009 11:31 am

Post by eggysoldier »

Just wanted to say thanks. This is a really awesome script, love it :P

1 problem: !news isn't working.

Also, a possible suggestion:
Rather than putting: "#,### results " followed by some results; perhaps it would be nice to put "#,### results for www.google.com/searched+terms " or whatever.
That way if the one someone is looking for isn't found, then there is a nice link for them to click.

You have kind of already done this suggestion on a few search engines, for instance mininova you have:
"### torrents", then some results, and then you put the search url.
It would be nice to have it all on one line (for those of us who /n) or at least in the same place so "### torrents for www.mininova.org/something "

Just an idea though, and thanks again for an awesome script.


EDIT:
I also get: "Tcl error [incith::google::public_message]: can't read "date": no such variable"
when I run: "!top pc"
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

eggysoldier wrote:Just wanted to say thanks. This is a really awesome script, love it :P

1 problem: !news isn't working.
Yep, google is always modifying their templates and engines, but this is a small problem to fix. In fact, already fixed it the moment it broke was just waiting for someone to speak up here to release a new version.. heh
eggysoldier wrote:Also, a possible suggestion:
Rather than putting: "#,### results " followed by some results; perhaps it would be nice to put "#,### results for www.google.com/searched+terms " or whatever.
That way if the one someone is looking for isn't found, then there is a nice link for them to click.
The problem is, your injecting an english word "for" into that reply. This is not how the script works. Everything is read dynamically and verbatim from the webpage in the language chosen. It is then parsed into segments and formatted for display onto irc. Most every single word you see displayed is read from the webpage, script generated error messages will of course always be in english and I'm english. But for everything else, using the country switch will keep everything in the language chosen.
eggysoldier wrote:You have kind of already done this suggestion on a few search engines, for instance mininova you have:
"### torrents", then some results, and then you put the search url.
It would be nice to have it all on one line (for those of us who /n) or at least in the same place so "### torrents for www.mininova.org/something "
Mininova has that appended to the end because of how that part operates. It sorts by top seeds and shows the top few. But what if you wanted to see beyond that? The url is shown for that reason. Perhaps later on this addition can be made to all the other sites this script scrapes, but for sure it won't be today. ;)
eggysoldier wrote:Just an idea though, and thanks again for an awesome script.
Ideas are always welcome, and yes the script is quite nice when it works correctly. ;)

eggysoldier wrote:EDIT:
I also get: "Tcl error [incith::google::public_message]: can't read "date": no such variable"
when I run: "!top pc"
Yep, the single error catch I have for !top and !pop seems to have changed. I've added a second error catch which will now trap their 503 message and spill it onto irc.

Also, for others who have asked for this, there is now a config option named short_answers. When enabled the search results within google will only return a single result if the result is the "answer". Enabling this will also skip google news/image/video/group results from appearing as results which was also requested.

The biggest change of all hardly any will notice (it happened rarely), but it is included all the same (at no extra charge! haw). The script had (read this as doesn't now) a flaw regarding splitting lines and keeping intact the bolding/underlining when continuing the text onto the next line. For example, take this line:
Hello everyone, this part is entirely in bold for a reason to show what happens when something tries to split it and tries to render the remaining segments of that line onto irc, something will break, let's watch ;)
Now when the bot attempts to split this the old way (the bad way), let's say the split will occur within the bold region, like below for example:
<bot> Hello everyone, this part is entirely in bold for a reason to show what happens when something tries to split it and tries
<bot> to render the remaining segments of that line onto irc, something will break, let's watch ;)
Notice what happened? Where'd the bold go on the second line? Why is it switched??! With the new split method (the good way) this will never occur, bolds and underlines will be kept intact throughout the split, like below for example:
<bot> Hello everyone, this part is entirely in bold for a reason to show what happens when something tries to split it and tries
<bot> to render the remaining segments of that line onto irc, something will break, let's watch ;)
Perfection. This is how the script now handles these line splits. *insert applause here*
Note: If your using color, stay tuned for the next version. It will include support for color splits as well.

Incith:Google v1.9.9d and as always.. Have a fun :P

Note: If you experience any odd behavior please shout it out loud here.. :D
e
eggysoldier
Voice
Posts: 7
Joined: Wed Feb 25, 2009 11:31 am

Post by eggysoldier »

Nice I will try that new version out now! :)

Also, perhaps you might consider adding last.fm to the searches?
b
blackmanta
Voice
Posts: 1
Joined: Sat Mar 07, 2009 5:55 pm
Location: indonesia

Post by blackmanta »

hi this is really awesome script and many ppl will agreed with me i guess ^^ :lol: and thx for the author(speechles) who had made it.... btw i had a suggestion about !locate command cause when i try !locate 125.160.57.47 (my own ip) and the result will be (125.160.57.47) @ Indio, California, United States (86%) [GMT:-08:00|Proxy:false|US Dollar|USD] and i belive that was a mistaken lol cause i dun live at US, and the right result should be

from
http://www.ipaddresslocation.org/ip-address-locator.php
Your IP Address: 125.160.57.47
IP Address Hostname: 47.subnet125-160-57.speedy.telkom.net.id
IP Country: Indonesia
IP Country Code: IDN
IP Continent: Asia
IP Region: Kalimantan Selatan
Guessed City: Banjarmasin
IP Latitude: -3.3333
IP Longitude: 114.5833
ISP Provider: PT TELKOM INDONESIA

guess that is the right result even i never try to offence the author(speechles) or anyone else who got involved in this project ^^ and thx again for this AWESOME tcl :D :D :D :D :D :D :D
Post Reply