i tried modifying green's tv tcl for another website for !today, !tommorrow, but i can't seem to get any data when i call it from dcc
# Config
set url "http://www.thefutoncritic.com/cgi/calen ... w=whatsnew"
set dcctrigger "example"
# End of config
if {![info exists egghttp(version)]} {
putlog "egghttp.tcl was NOT successfully loaded."
putlog "example.tcl has not been loaded as a result."
} else {
proc your_callbackproc {sock} {
global url
set headers [egghttp:headers $sock]
set data [egghttp:data $sock]
set data [string map {"\n" ""} $data]
set data [string map {"</tr>" "</tr>\n"} $data]
set data [string map {"</div>" "</div>\n"} $data]
set data [string map {"</td>" "</td>~"} $data]
set data [string map {"f-normal\">" "f-normal\">~"} $data]
set parse 0
foreach line [split $data \n] {
if [string match -noc "*<span class='bigorange'>*" $line] {set parse 1}
if {$parse&&[string match -noc *<span class='bigorange'>7/8/2005 (friday)</span>* $line]} {return}
if {$parse} {
regsub -all {<(.|\n)*?>} $line {} clean
set out [join $clean]
putlog "$out"
}
}
}
bind dcc o|o $dcctrigger our:dcctrigger
proc our:dcctrigger {hand idx text} {
global url
set sock [egghttp:geturl $url your_callbackproc]
return 1
}
putlog "example.tcl has been successfully loaded."
}