| View previous topic :: View next topic |
| Author |
Message |
SamSun Voice
Joined: 02 Sep 2017 Posts: 1
|
Posted: Sat Sep 02, 2017 8:21 am Post subject: horoscop.tcl |
|
|
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¤tAction=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 |
|
 |
|
|
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
|
|