Posted to tcl by FrozenSoul at Sun Dec 17 16:58:35 GMT 2017view raw

  1. proc checkvotingch {} {
  2. set token [::http::geturl "http://awebpage" -timeout 30000]
  3. set data [::http::data $token]
  4. if { [regexp -all -nocase -- {<tr>\n<td>\n<a href="sugg-view-(.+?).html">(.+?)<\/a>\n<\/td>\n<td>} $data -> webId vote] } {
  5. $webId and $vote - available
  6. }
  7. }
  8. }
  9.  
  10. proc checkvotingch {n u h c t} {
  11. set token [::http::geturl "http://awebpage" -timeout 30000]
  12. set data [::http::data $token]
  13. set matches [regexp -all -nocase -- {<tr>\n<td>\n<a href="sugg-view-(.+?).html">(.+?)<\/a>\n<\/td>\n<td>} $data]
  14. putquick "PRIVMSG $c :LAST VOTINGS:"
  15. foreach {webId vote} $matches {
  16. $webId $vote - not available
  17. }
  18. # }
  19. }