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
I
IuClik
Voice
Posts: 9
Joined: Thu Apr 24, 2008 5:21 am

Post by IuClik »

i change it, i have some error

Code: Select all

Timpul probabil pentru Chi?in?u, Moldova: -3 °C, Оn prezent: Z?pad?, Vвnt: N cu 19 km/h; Umiditate: 93%; Du: ?anse de z?pad? (0°C|-9°C); Lu: ?anse de z?pad? (0°C|-8°C); Ma: Senin (-1°C|-14°C)
how to make for

ş = s
ă = a
Î = i

it`s posible?
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

IuClik wrote:i change it, i have some error

Code: Select all

Timpul probabil pentru Chi?in?u, Moldova: -3 °C, Оn prezent: Z?pad?, Vвnt: N cu 19 km/h; Umiditate: 93%; Du: ?anse de z?pad? (0°C|-9°C); Lu: ?anse de z?pad? (0°C|-8°C); Ma: Senin (-1°C|-14°C)
how to make for

ş = s
ă = a
Î = i

it`s posible?
You must utf-8 patch your eggdrop. This script then will work flawlessly, rendering everything perfectly. This has been tested.

But....Until you patch your eggddrop you will notice problems with some characters rendering. This is unavoidable.

You can find the patch: Here
n
neocratic
Voice
Posts: 15
Joined: Sun May 16, 2010 11:59 am

About !g time country

Post by neocratic »

No success in !g time country bug? :S
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Re: About !g time country

Post by speechles »

neocratic wrote:No success in !g time country bug? :S
There will be shortly. It's just with this script I need to devote a serious slice of continuous time. It can't be short bursts of 15 minutes here or there. This weekend I will have that time to eliminate some of the problems that have over time resurfaced: google time, wikipedia, wikimedia, youtube, etc ... These all have issues in one way or another. When fixing these I will likely find even more issues and correct these along the way. This is why I tend to let things stack up before releasing a fix because I want to evolve it forward correcting long standing issues (like no bold in results when utf-8 patched?), inconsistent encodings, etc. The things that in the long run will create a better end product. Rushing to fix regex parsing bugs is a short term fix with no evolution to me..

But suffice to say, you don't need to read any of that diatribe above if you don't want to. It's just words. But expect a new version of this script this weekend. In that it will most assuredly correct the "time" problem you are experiencing. :)
R
Robby
Voice
Posts: 4
Joined: Thu Jan 27, 2011 3:33 pm
Location: Belgium

Post by Robby »

Hello speechles, maybe you can also take a look at why I always have to set use_gzip to 0 again, rehash and set it back to 1 (and rehash again, of course) to get rid of the "data error" message. The bot does say "Incith:Google compression test successful, found zlib package! Gzip enabled.", so it does work, strange. :)

Also, I upgraded my bot to 1.8 (CVS) and !youtube is giving problems, BUT I didn't test it before I upgraded so this may very well be a coincidence and been broken before the upgrade, other things like !google, !wikipedia and !ebay are still working, so I suspect YouTube has changed their website layout or something. The problem is that it gives *massive* output to the channel, including html/javascript code, I had to disable the YouTube triggers to prevent anyone using it. Anyone else having YouTube problems?
X
XulyTest
Voice
Posts: 4
Joined: Sat Jan 29, 2011 6:10 am

Post by XulyTest »

"Anyone else having YouTube problems?"

You're right. Youtube changed is Html.
You have to change something in the Tcl to go through this.

initial tcl (in youtube procedure) :

Code: Select all

     # parse the html
      while {$results < $incith::google::youtube_results} {
        # somewhat extenuated regexp due to allowing that there might be an image next to the title
        if {[regexp -nocase {<span class="video-time">(.*?)</span.*?[b]id="video-long.*?[/b]href="/watch\?v=(.+?)".+?title=".+?">(.+?)</a>.*?id="video\-description.*?">(.*?)</p.*?class="video\-date\-added">(.+?)</span.*?class="video\-view\-count">(.+?)</span} $html - ded4 cid desc ded ded2 ded3]} {
          if {[string match "*</span>*" $desc]} {
            regexp -nocase {<span class="video-time">(.*?)</span.*?[b]id="video-long.*?[/b]href="/watch\?v=(.+?)".+?title="(.*?)">.*?id="video\-description.*?">(.*?)</p.*?class="video\-date\-added">(.+?)</span.*?class="video\-view\-count">(.+?)</span} $html - ded4 cid desc ded ded2 ded3
          }
          regsub -nocase {<span class="img">.*?</div>      </div>} $html "" html
        }
The word : id="video-long isn't used now. You have to delete what I've bold in these lines...

PS : Sorry for my english.. I'm French... :oops:
b
bfoos
Voice
Posts: 6
Joined: Thu Sep 30, 2010 6:17 pm

Post by bfoos »

!yt was more broken than that. A better temporary solution is to set...

variable youtube_results 0

Then add...

"yt:g:site:youtube.com %search%"

Under Custom Trigger Phrasing.

speechles is due to address this issue amongst others in an upcoming update.
X
XulyTest
Voice
Posts: 4
Joined: Sat Jan 29, 2011 6:10 am

Post by XulyTest »

sorry... there are some other words is this tcl not used in youtube changes :
- id="video-long
- class="video-date-added"
- class="video-view-count"

The first one can be deleted (as I said before)
The other one should be replaced by :
- class="date-added"
- class="viewcount"

And now it's ok. Sorry !
User avatar
spithash
Master
Posts: 249
Joined: Thu Jul 12, 2007 9:21 am
Location: Libera
Contact:

Post by spithash »

XulyTest wrote:sorry... there are some other words is this tcl not used in youtube changes :
- id="video-long
- class="video-date-added"
- class="video-view-count"

The first one can be deleted (as I said before)
The other one should be replaced by :
- class="date-added"
- class="viewcount"

And now it's ok. Sorry !
...now that you said youtube :idea:
(01:55:45) <@spithash> !youtube 894coNVEnsQ
(01:55:49) < nagger> 2:45 Add to Added to queue Rubba Dub Dubstep (Dubstep Dance) Do the Dubstep dance! Songs taken from the Excision Shambhala 2009 Mix 1. SONG: 'Excision & Datsik -
Boom' - VIDEO: 'Mac and Me' 2. SONG: 'Mark ... by theAdrian86| 1 year ago| 180,452 views #search-pva { width: 300px; }
(01:55:50) < nagger> function isRtl() { return document.body.dir == "rtl"; } function setRtlYva(suffix) { // IE if (!suffix) { try { var adCreative =
_gel('homepage-side-content'); var yvaflash = adCreative.getElementsByTagName('embed')[0]; if (yvaflash.id.indexOf('FLASH_') == -1) { return; } suffix =
yvaflash.id.replace(/FLASH_/, ''); } catch (e) {
(01:55:52) < nagger> if ('message' in e) { yt.www.logError(e.message, '', ''); } else if ('description' in e ) { /** IE specific. **/ yt.www.logError(e.description, '', ''); }
return; } } // Unclips the YVA, actually triggering richMedia.clipFlashObject below. var fixYvaDom = function(suffix) { var yvaDiv = _gel('DIV_' + suffix); var yvaFlash =
_gel('FLASH_' +
(01:55:57) < nagger> suffix); yvaDiv.style.left = "0px"; if (isRtl()) { yvaDiv.style.right = "0px"; } yvaDiv.style.clip = "rect(auto auto auto auto)"; yvaFlash.style.marginLeft =
"0px"; yvaFlash.width = '300px'; } // Make sure the richmedia prototype exists. var richMedia; if (window.core && window.core.constructor) { richMedia =
window.core.constructor.prototype; } else
...and in the end...
(01:56:15) *** nagger (~redneck@goofy.trollbot.org) has quit (Excess Flood)
I'm not sure if youtube changed the website's code or it's just the search string I used. Pardon me, but, that was just a quick test as far as I could remember cause I tested it before :P
Libera ##rtlsdr & ##re - Nick: spithash
Click here for troll.tcl
X
XulyTest
Voice
Posts: 4
Joined: Sat Jan 29, 2011 6:10 am

Post by XulyTest »

Hello,

I thing it's because of a mistake.

Can test this please ?

Replace in the youtube procedure :

Code: Select all

     # parse the html 
      while {$results < $incith::google::youtube_results} { 
        # somewhat extenuated regexp due to allowing that there might be an image next to the title 
        if {[regexp -nocase {<span class="video-time">(.*?)</span.*?id="video-long.*?href="/watch\?v=(.+?)".+?title=".+?">(.+?)</a>.*?id="video\-description.*?">(.*?)</p.*?class="video\-date\-added">(.+?)</span.*?class="video\-view\-count">(.+?)</span} $html - ded4 cid desc ded ded2 ded3]} { 
          if {[string match "*</span>*" $desc]} { 
            regexp -nocase {<span class="video-time">(.*?)</span.*?id="video-long.*?href="/watch\?v=(.+?)".+?title="(.*?)">.*?id="video\-description.*?">(.*?)</p.*?class="video\-date\-added">(.+?)</span.*?class="video\-view\-count">(.+?)</span} $html - ded4 cid desc ded ded2 ded3 
          } 
          regsub -nocase {<span class="img">.*?</div>      </div>} $html "" html 
        } 
By exactly these lines :

Code: Select all

 

      # parse the html
      while {$results < $incith::google::youtube_results} {
        # somewhat extenuated regexp due to allowing that there might be an image next to the title
        if {[regexp -nocase {<span class="video-time">(.*?)</span.*?href="/watch\?v=(.+?)".+?title=".+?">(.+?)</a>.*?id="video\-description.*?>(.*?)</p.*?class="date\-added">(.+?)</span.*?class="viewcount">(.+?)</span} $html - ded4 cid desc ded ded2 ded3]} {
          if {[string match "*</span>*" $desc]} {
            regexp -nocase {<span class="video-time">(.*?)</span.*?href="/watch\?v=(.+?)".+?title="(.*?)">.*?id="video\-description.*?">(.*?)</p.*?class="date\-added">(.+?)</span.*?class="viewcount">(.+?)</span} $html - ded4 cid desc ded ded2 ded3
          }
          regsub -nocase {<span class="img">.*?</div>      </div>} $html "" html
        }
The probleme is : without these lines well corrected, your procedure "youtube" can't create $desc, $cid etc. and then, returns the variable $reply (that's why you turned off with excess flood), instead of returning $outpout.

I hope I helped you...
User avatar
spithash
Master
Posts: 249
Joined: Thu Jul 12, 2007 9:21 am
Location: Libera
Contact:

Post by spithash »

XulyTest: Actually this gave me this error after editing it:

Code: Select all

[21:30] 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-v2.00a.tcl" line 1250)
    invoked from within
"source scripts/incith-google-v2.00a.tcl"
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 »

ok, adding an extra } fixed it, but it's not working at all now.

Code: Select all

      # parse the html
      while {$results < $incith::google::youtube_results} {
        # somewhat extenuated regexp due to allowing that there might be an image next to the title
        if {[regexp -nocase {<span class="video-time">(.*?)</span.*?href="/watch\?v=(.+?)".+?title=".+?">(.+?)</a>.*?id="video\-description.*?>(.*?)</p.*?class="date\-added">(.+?)</span.*?class="viewcount">(.+?)</span} $html - ded4 cid desc ded ded2 ded3]} {
          if {[string match "*</span>*" $desc]} {
            regexp -nocase {<span class="video-time">(.*?)</span.*?href="/watch\?v=(.+?)".+?title="(.*?)">.*?id="video\-description.*?">(.*?)</p.*?class="date\-added">(.+?)</span.*?class="viewcount">(.+?)</span} $html - ded4 cid desc ded ded2 ded3
          }
          regsub -nocase {<span class="img">.*?</div>      </div>} $html "" html
        }
	}
my script looks like this ^

But after I !youtube search, it just shows/does nothing :?: :!:

EDIT: the bot ping timeouts and never comes back after the searching.
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 »

Guys, can this !wiki script that is included in incith-google tcl be modded to work with http://memory-alpha.org/wiki/Portal:Main wiki? (star trek's wiki) :P I think the template is wikia.com 's
Libera ##rtlsdr & ##re - Nick: spithash
Click here for troll.tcl
X
XulyTest
Voice
Posts: 4
Joined: Sat Jan 29, 2011 6:10 am

Post by XulyTest »

EDIT: the bot ping timeouts and never comes back after the searching.
Your Egg' pings because of a loop not closed... You have probably made something wrong with the modification...

Are you sure you added the close-brase at the good place ? :?
User avatar
spithash
Master
Posts: 249
Joined: Thu Jul 12, 2007 9:21 am
Location: Libera
Contact:

Post by spithash »

XulyTest wrote:
EDIT: the bot ping timeouts and never comes back after the searching.
Your Egg' pings because of a loop not closed... You have probably made something wrong with the modification...

Are you sure you added the close-brase at the good place ? :?
I just pasted you where I added it bro.. it's the last one as I pasted 2 posts above...
Libera ##rtlsdr & ##re - Nick: spithash
Click here for troll.tcl
Post Reply