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 2.1x (Nov30,2o12)
Goto page Previous  1, 2, 3 ... 46, 47, 48 ... 56, 57, 58  Next
 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases
View previous topic :: View next topic  
Author Message
IuClik
Voice


Joined: 24 Apr 2008
Posts: 9

PostPosted: Sun Jan 23, 2011 11:50 am    Post subject: Reply with quote

i change it, i have some error

Code:
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?
Back to top
View user's profile Send private message
speechles
Revered One


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

PostPosted: Sun Jan 23, 2011 12:07 pm    Post subject: Reply with quote

IuClik wrote:
i change it, i have some error

Code:
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
_________________
speechles' eggdrop tcl archive
Back to top
View user's profile Send private message
neocratic
Voice


Joined: 16 May 2010
Posts: 15

PostPosted: Wed Jan 26, 2011 4:09 am    Post subject: About !g time country Reply with quote

No success in !g time country bug? :S
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
speechles
Revered One


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

PostPosted: Wed Jan 26, 2011 9:32 pm    Post subject: Re: About !g time country Reply with quote

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. Smile
_________________
speechles' eggdrop tcl archive
Back to top
View user's profile Send private message
Robby
Voice


Joined: 27 Jan 2011
Posts: 4
Location: Belgium

PostPosted: Thu Jan 27, 2011 3:52 pm    Post subject: Reply with quote

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. Smile

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?
Back to top
View user's profile Send private message
XulyTest
Voice


Joined: 29 Jan 2011
Posts: 4

PostPosted: Sat Jan 29, 2011 6:22 am    Post subject: Reply with quote

"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:

     # 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... Embarassed
Back to top
View user's profile Send private message
bfoos
Voice


Joined: 30 Sep 2010
Posts: 6

PostPosted: Sat Jan 29, 2011 6:43 am    Post subject: Reply with quote

!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.
Back to top
View user's profile Send private message
XulyTest
Voice


Joined: 29 Jan 2011
Posts: 4

PostPosted: Sat Jan 29, 2011 7:00 am    Post subject: Reply with quote

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 !
Back to top
View user's profile Send private message
spithash
Master


Joined: 12 Jul 2007
Posts: 248
Location: Libera

PostPosted: Mon Jan 31, 2011 8:16 pm    Post subject: Reply with quote

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
Quote:

(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...

Quote:
(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 Razz
_________________
Libera ##rtlsdr & ##re - Nick: spithash
Click here for troll.tcl
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
XulyTest
Voice


Joined: 29 Jan 2011
Posts: 4

PostPosted: Tue Feb 01, 2011 3:28 am    Post subject: Reply with quote

Hello,

I thing it's because of a mistake.

Can test this please ?

Replace in the youtube procedure :

Code:

     # 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:
 

      # 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...
Back to top
View user's profile Send private message
spithash
Master


Joined: 12 Jul 2007
Posts: 248
Location: Libera

PostPosted: Wed Feb 02, 2011 3:35 pm    Post subject: Reply with quote

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

Code:
[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
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
spithash
Master


Joined: 12 Jul 2007
Posts: 248
Location: Libera

PostPosted: Wed Feb 02, 2011 3:43 pm    Post subject: Reply with quote

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

Code:
      # 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 Question Exclamation

EDIT: the bot ping timeouts and never comes back after the searching.
_________________
Libera ##rtlsdr & ##re - Nick: spithash
Click here for troll.tcl
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
spithash
Master


Joined: 12 Jul 2007
Posts: 248
Location: Libera

PostPosted: Wed Feb 02, 2011 3:57 pm    Post subject: Reply with quote

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) Razz I think the template is wikia.com 's
_________________
Libera ##rtlsdr & ##re - Nick: spithash
Click here for troll.tcl
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
XulyTest
Voice


Joined: 29 Jan 2011
Posts: 4

PostPosted: Wed Feb 02, 2011 5:48 pm    Post subject: Reply with quote

Quote:

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 ? Confused
Back to top
View user's profile Send private message
spithash
Master


Joined: 12 Jul 2007
Posts: 248
Location: Libera

PostPosted: Wed Feb 02, 2011 7:02 pm    Post subject: Reply with quote

XulyTest wrote:
Quote:

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 ? Confused


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
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases All times are GMT - 4 Hours
Goto page Previous  1, 2, 3 ... 46, 47, 48 ... 56, 57, 58  Next
Page 47 of 58

 
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