I got this code from a web page:
Code: Select all
<a href="http://uk.weather.yahoo.com/Europe/United_Kingdom/England/">
<a href="http://uk.weather.yahoo.com/UKXX/UKXX0085/index_c.html">
Code: Select all
UKXX/UKXX0085Code: Select all
regexp -nocase {<a href="http://uk.weather.yahoo.com/(.*?)/index_c.html">} $data data matchCode: Select all
Europe/United_Kingdom/England/">Code: Select all
package require http
bind pub - !weather www:weather
proc www:weather {nick host handle chan text} {
set query $text
set data [http::data [http::geturl http://uk.search.weather.yahoo.com/search/weather_ukie?p=$query]]
regexp {<a href="http://uk.weather.yahoo.com/(.*?)/index_c.html">} $data data match
puthelp "PRIVMSG $chan :$match"
}