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
K
Koo
Voice
Posts: 37
Joined: Fri Apr 02, 2010 7:43 pm

Post by Koo »

pogue wrote:Currency exchange also is no longer working (ie: !g 1usd to euro)
Really? I've tested it to my bot using the same script and here's the result:
<@Koo> !g 1usd to euro
<%Angel>1 US dollar = 0.7660 euros
It worked OK to me. :)

But I agree, !i is no longer working. :(
User avatar
pogue
Voice
Posts: 28
Joined: Sun May 17, 2009 3:56 am
Contact:

Post by pogue »

Koo wrote:
pogue wrote:Currency exchange also is no longer working (ie: !g 1usd to euro)
Really? I've tested it to my bot using the same script and here's the result:
<@Koo> !g 1usd to euro
<%Angel>1 US dollar = 0.7660 euros
It worked OK to me. :)
I'm getting different outputs.
[11:43pm] <~pogue> !g 1usd to euro
[11:43pm] <+BodyBuildingBot> 507,000 results | Exchange Rates Graph (American Dollar, Euro) @ http://www.x-rates.com/d/EUR/USD/graph120.html | XE - The World's Favorite Currency and Foreign Exchange Site @ http://www.xe.com/ | Currency Converter - Yahoo! Finance @ http://finance.yahoo.com/currency-conve ... it=convert

Debug:
[11:43pm] <BodyBuildingBot> url (200): http://www.google.com/search?q=1usd%20t ... n&ie=utf-8 charset: utf-8 encode_string: :: Cookie: PREF=ID=95fce6638b53cb71:TM=1280724191:LM=1280724191:S=R9kIJf4dktb_L0Mx;NID=37=EUlR7CuaB4S9SfDDP-x_gZIH-Xx3hSr_JYHmhfHaAhD8Jzj7q_u9l5JXeV2NNrz0Al8gKeKmNBqqfoBTPPgiItepzUOAw63apnvTuHUklUoyqYqpysQdR5tDUPlxtPuE
[11:45pm] <~pogue> !g 1euro to usd
[11:45pm] <+BodyBuildingBot> 3,130 results | Exchange Rates Graph (Euro, American Dollar) @ http://www.x-rates.com/d/USD/EUR/graph120.html | Currency Converter - Yahoo! Finance @ http://finance.yahoo.com/currency-conve ... it=convert | EURUSD=X: Summary for EUR/USD- Yahoo! Finance @ http://finance.yahoo.com/q?s=eurusd=x

Debug:
[11:45pm] <BodyBuildingBot> url (200): http://www.google.com/search?q=1euro%20 ... n&ie=utf-8 charset: utf-8 encode_string: :: Cookie: PREF=ID=7f8b533d26fa99a0:TM=1280724311:LM=1280724311:S=IRDbWWBMJ0zjzRcN;NID=37=hB6vGzwjT3kt8Lu6_qvczcIQ8Ky-hMdFybSPj4hL65NqWeN6Zf4-K3IwDuvgrKrn2e_9HayishNpWXURVJtdhmT9ao4kDHdNSmvBNZlB1VpUmBvKhKDa01xlJc4MQx6r
Same happens when trying to do any currency exchange (pounds, euro, GPB, CAD, etc)
Helpful Tools:
  • Notepad++: Windows Text Editor with TCL Syntax Highlighting
  • Pastebin TCL: For easy script collaboration
K
Koo
Voice
Posts: 37
Joined: Fri Apr 02, 2010 7:43 pm

Post by Koo »

pogue wrote:I'm getting different outputs.
[11:43pm] <~pogue> !g 1usd to euro
[11:43pm] <+BodyBuildingBot> 507,000 results | Exchange Rates Graph (American Dollar, Euro) @ http://www.x-rates.com/d/EUR/USD/graph120.html | XE - The World's Favorite Currency and Foreign Exchange Site @ http://www.xe.com/ | Currency Converter - Yahoo! Finance @ http://finance.yahoo.com/currency-conve ... it=convert

Debug:
[11:43pm] <BodyBuildingBot> url (200): http://www.google.com/search?q=1usd%20t ... n&ie=utf-8 charset: utf-8 encode_string: :: Cookie: PREF=ID=95fce6638b53cb71:TM=1280724191:LM=1280724191:S=R9kIJf4dktb_L0Mx;NID=37=EUlR7CuaB4S9SfDDP-x_gZIH-Xx3hSr_JYHmhfHaAhD8Jzj7q_u9l5JXeV2NNrz0Al8gKeKmNBqqfoBTPPgiItepzUOAw63apnvTuHUklUoyqYqpysQdR5tDUPlxtPuE
[11:45pm] <~pogue> !g 1euro to usd
[11:45pm] <+BodyBuildingBot> 3,130 results | Exchange Rates Graph (Euro, American Dollar) @ http://www.x-rates.com/d/USD/EUR/graph120.html | Currency Converter - Yahoo! Finance @ http://finance.yahoo.com/currency-conve ... it=convert | EURUSD=X: Summary for EUR/USD- Yahoo! Finance @ http://finance.yahoo.com/q?s=eurusd=x

Debug:
[11:45pm] <BodyBuildingBot> url (200): http://www.google.com/search?q=1euro%20 ... n&ie=utf-8 charset: utf-8 encode_string: :: Cookie: PREF=ID=7f8b533d26fa99a0:TM=1280724311:LM=1280724311:S=IRDbWWBMJ0zjzRcN;NID=37=hB6vGzwjT3kt8Lu6_qvczcIQ8Ky-hMdFybSPj4hL65NqWeN6Zf4-K3IwDuvgrKrn2e_9HayishNpWXURVJtdhmT9ao4kDHdNSmvBNZlB1VpUmBvKhKDa01xlJc4MQx6r
Same happens when trying to do any currency exchange (pounds, euro, GPB, CAD, etc)
That's odd. :o

Looks like we have to wait for the update of the script. Hopefully it would be soon. :P
User avatar
spithash
Master
Posts: 249
Joined: Thu Jul 12, 2007 9:21 am
Location: Libera
Contact:

Post by spithash »

So yeah, I talked to speechles about the images.google thinggie, and it's very simple to make it work again, untill he makes another release of this wonderful TCL :)

make the line look like this:

Code: Select all

set query "http://images.google.${country}/images?q=${input}&safe=${incith::google::safe_search}&btnG=Search+Images&ie=utf-8&sout=1" 
So all in all, you just have to add this

Code: Select all

&sout=1 
to the end of the URL

Thank you speechless for this :)

!i & !images work now :wink:
Libera ##rtlsdr & ##re - Nick: spithash
Click here for troll.tcl
z
z0rc
Voice
Posts: 7
Joined: Mon Oct 13, 2008 9:41 am

Post by z0rc »

Google Translate updated their interface once again. !tr parser is broken now.
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

At the moment, I'm on very very limited satellite connection. I also, am not at home where I could update the script. I'm at my parents pretty much in the middle of nowhere. Here the fastest dialup is 28.8, hence the satellite connection which puts ridiculous caps on everything. So suffice it to say, when I get back home, the 4th or 5th I plan on updating everything that has broken in my absense.

Until then, I can post from here. Just can't do much else. My pc is on a dedicated broadband connection at home. Once I'm home expect an update shortly afterwards. ;)
M
MellowB
Voice
Posts: 24
Joined: Wed Jan 23, 2008 6:02 am
Location: Germany
Contact:

Post by MellowB »

Yay, finally some good news. :Y
On the keyboard of life, always keep one finger on the ESC key.
t
tmyoungjr
Voice
Posts: 14
Joined: Fri Aug 24, 2007 3:30 pm

Post by tmyoungjr »

spithash wrote:So yeah, I talked to speechles about the images.google thinggie, and it's very simple to make it work again, untill he makes another release of this wonderful TCL :)

make the line look like this:

Code: Select all

set query "http://images.google.${country}/images?q=${input}&safe=${incith::google::safe_search}&btnG=Search+Images&ie=utf-8&sout=1" 
So all in all, you just have to add this

Code: Select all

&sout=1 
to the end of the URL

Thank you speechless for this :)

!i & !images work now :wink:
This worked thanks! Looking forward to you getting home and the next update speechles!
User avatar
spithash
Master
Posts: 249
Joined: Thu Jul 12, 2007 9:21 am
Location: Libera
Contact:

Post by spithash »

no news yet ? :)
Libera ##rtlsdr & ##re - Nick: spithash
Click here for troll.tcl
User avatar
spithash
Master
Posts: 249
Joined: Thu Jul 12, 2007 9:21 am
Location: Libera
Contact:

Post by spithash »

!ebay fails too...

it shows only the number of the results
Libera ##rtlsdr & ##re - Nick: spithash
Click here for troll.tcl
User avatar
Trixar_za
Op
Posts: 143
Joined: Wed Nov 18, 2009 1:44 pm
Location: South Africa
Contact:

Post by Trixar_za »

You can fix google translate by changing:

Code: Select all

if {[regexp -- {<textarea name=utrans.*?">(.+?)</textarea} $html - match]} { regsub -all {<.*?>} $match "" match }
to

Code: Select all

if {[regexp -- {<div id=autotrans.*?</object></div>(.+?)</div} $html - match]} { regsub -all {<.*?>} $match "" match }
Yeah, I know, it's not the most elegant regex match ever so maybe somebody can refine it a bit more but otherwise it seems to work for me ;)

EDIT: Ok, I refined the regex match a bit. The above code is as refined as I could make it without breaking it again.
User avatar
spithash
Master
Posts: 249
Joined: Thu Jul 12, 2007 9:21 am
Location: Libera
Contact:

Post by spithash »

good call Trixar :)
Libera ##rtlsdr & ##re - Nick: spithash
Click here for troll.tcl
User avatar
spithash
Master
Posts: 249
Joined: Thu Jul 12, 2007 9:21 am
Location: Libera
Contact:

Post by spithash »

well, it doesn't work well though...

it should work like this:

Code: Select all

[15:11:59] < spithash> !tr amigo
[15:12:35] <@sp33chy> Google: (auto->en) Portuguese to English translation
[15:12:37] <@sp33chy> friend
but this is how it works:

Code: Select all

[15:13:06] <@spithash> !tr amigo
[15:13:08] <@nagger> Google: (auto->en) 
[15:13:09] <@nagger> friend
Libera ##rtlsdr & ##re - Nick: spithash
Click here for troll.tcl
User avatar
Trixar_za
Op
Posts: 143
Joined: Wed Nov 18, 2009 1:44 pm
Location: South Africa
Contact:

Post by Trixar_za »

You can easily add the functionality you want by changing:

Code: Select all

if {![regexp -- {</div></div></div></form>(.+?)<img} $html {} detect]} {set detect ""} { regsub -all {<.*?>} $detect "" detect}
to

Code: Select all

if {![regexp -- {<h3 id=headingtext>(.+?)</h3>} $html {} detect]} {set detect ""} { regsub -all {<.*?>} $detect "" detect}
Speechles: I envy you. You have way more patience than I do when having to deal with changing site layouts, people complaints and general support. You do provide the tools for people to fix bug themselves - all they have to do is bother to.
User avatar
spithash
Master
Posts: 249
Joined: Thu Jul 12, 2007 9:21 am
Location: Libera
Contact:

Post by spithash »

Trixar_za wrote:You can easily add the functionality you want by changing:

Code: Select all

if {![regexp -- {</div></div></div></form>(.+?)<img} $html {} detect]} {set detect ""} { regsub -all {<.*?>} $detect "" detect}
to

Code: Select all

if {![regexp -- {<h3 id=headingtext>(.+?)</h3>} $html {} detect]} {set detect ""} { regsub -all {<.*?>} $detect "" detect}
It really works perfect :)

Thanks Trixar :)

I'm sure speechles is more than busy lately .. hehe 8)
Libera ##rtlsdr & ##re - Nick: spithash
Click here for troll.tcl
Post Reply