The stuff you want from that page is betwen two lines "<blockquote>" and "</blockquote>" .. Remove all the garbage with "regsub -all -- {<[^>]+>|<} $garbage "" clean" and the 3-rd line is your stuff. Anyway, here is something using the default http package.
if {[catch {package require http} err]} {
putlog "\002horoscope.tcl\002 requires http package in order to work. Unload the script if you don't have the http package."
return
}
set horoscope(url) "http://www.detikhot.com/index.php/detik.horoskop/idkanal/113/p/horoskopmasehi/d/aries"
bind pub - !aries bosen:aries
proc bosen:aries {nick uhost hand chan text} {
global horoscope
set token [::http::geturl $horoscope(url)]
set content [::http::data $token]
::http::cleanup $content
set top "<blockquote>"
set bottom "</blockquote>"
set tosave [string range $content [set f [string first $top $content]] [string first $bottom $content $f]]
regsub -all -- {<[^>]+>|<} $tosave "" tosave
set l 3 ; set i 0
foreach line [split $tosave \n] {
if {$i == $l} {
set msg $line
break
}
incr i
}
# use the $msg variable to do whatever you want
}
Last edited by caesar on Sun Jan 02, 2005 1:39 pm, edited 1 time in total.
Once the game is over, the king and the pawn go back in the same box.
Because it's a big line the eggdrop dosen't seem to be able to tell it to the channel. I meant instead of the "# use the $msg variable to do whatever you want" add your stuff, anyway. Here is some sort of solution.. add something like:
demond: sorry if i become anoying to you but i dont think others will think the same as you, this forum made for helping each other if you cant help me so please just ignore it!!!![/code][/b]
Well, i think that others may think same as demond. Yes, this forum was mode for helping people, but for helping, not for doing whole job. Please use your brain, try to figure out how to get needed data.