package require http
set chan "#yourchannel"
#here we start our timer
timer 30 www:news
proc www:news { } {
set data [http::data [http::geturl http://someurl.com]]
regexp {</a> / <b><a href="(.*?)">(.*?)</a></b></div>} $data data match lik
puthelp "PRIVMSG $chan :Ostatni post na forum: \002$lik\002 - $match"
set data [http::data [http::geturl http://someurl.com]]
regexp {<div align="right"> : <b>(.*?)</b> (.*?) </div>} $data data czas godzina
puthelp "PRIVMSG $chan :Wyslany $czas $godzina"
set data [http::data [http::geturl http://someurl]]
regexp {Nowe: wysłane przez <a href="(.*?)">(.*?)</a> </span>} $data data user2 user
puthelp "PRIVMSG $chan :Autor: \002$user"
#and one more timer to cycle www:news proc
timer 30 www:news
}
it`s again me .. I try to sue regsub for replace some stupid text to polish letter but it does not work: i mean this line o the code:
regsub -all "¦" $match "s" match
proc www:news { } {
set data [http::data [http::geturl http://someurl.com]]
regexp {</a> / <b><a href="(.*?)">(.*?)</a></b></div>} $data data match lik
regsub -all "¦" $match "s" match
puthelp "PRIVMSG $chan :Ostatni post na forum: \002$lik\002 - $match"
set data [http::data [http::geturl http://someurl.com]]
regexp {<div align="right"> : <b>(.*?)</b> (.*?) </div>} $data data czas godzina
puthelp "PRIVMSG $chan :Wyslany $czas $godzina"
set data [http::data [http::geturl http://someurl]]
regexp {Nowe: wysłane przez <a href="(.*?)">(.*?)</a> </span>} $data data user2 user
puthelp "PRIVMSG $chan :Autor: \002$user"
#and one more timer to cycle www:news proc
timer 30 www:news
}