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.RAC: <iframe frameBorder=\"0\" width=\"auto\" id=\"dailyHoroscopeFrame\" style=\"min-width: 550px\" src=\"http://www.sentimente.ro/horoscop/index ... "></iframe>
Here is the script:
Code: Select all
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"
}
}