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 

Error on script
Goto page Previous  1, 2
 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
SamSun
Voice


Joined: 02 Sep 2017
Posts: 1

PostPosted: Sat Sep 02, 2017 8:21 am    Post subject: horoscop.tcl Reply with quote

Hi tried the script and i got this error
Quote:

RAC: <iframe frameBorder=\"0\" width=\"auto\" id=\"dailyHoroscopeFrame\" style=\"min-width: 550px\" src=\"http://www.sentimente.ro/horoscop/index/daily-zodii/?signId=rac&zodii=1&fs=12&currentAction=zilnic\"></iframe>

Website changed i guess but i don`t know how to fix the script to work again.If someone can take a look at the script and make that change. Thank You.

Here is the script:
Code:

namespace eval zodiac {
   package require http
   setudef flag horoscop
   bind pub -|- !horoscop [namespace current]::fetch

   proc fetch {nick uhost hand chan text} {
      if {![channel get $chan horoscop]} return
      if {[scan $text {%s} sign] != 1} {
         putserv "NOTICE $nick :Syntax: !horoscop <zodiac sign>"
         return
      }
      set signs [list "berbec" "taur" "gemeni" "rac" "leu" "fecioara" "balanta" "scorpion" "sagetator" "capricorn" "varsator" "pesti"]
      set sign [string tolower $sign]
      if {[lsearch $signs $sign] == -1} {
         putserv "NOTICE $nick :Error, $sign is a uknown sign. Pick another."
         return
      }
      set http [::http::geturl "http://www.zodii.ro/zodiac/$sign*zodie_$sign-horoscop_zilnic.html"]
      set data [::http::data $http]
      ::http::cleanup $http
      regexp -nocase {<div class="textArticol">(.*?)</div>} $data text
      set result [lrange $text 2 end-1]
      putserv "NOTICE $nick :[string toupper $sign]: $result"
   }
}
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Goto page Previous  1, 2
Page 2 of 2

 
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