[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [SLUG] Extracting Weather text out of a web page - Newbie Question
"Grahame M. Kelly" wrote:
> So, for a thick head on this side of the email, how does one extrace the
> temperature, due point, humidity textural information etc. from a page like
>
> http://www.weather.com/weather/cities/as__sydney.html
>
> Does anyone have a simpler more elegant solution ?
Simpler more elegant than which solution? Human eyes?
Here is one suggestion (requires perl and curl/wget)
1. grab the page with curl or wget (freely available on the web)
2. pipe the page into a perl script that uses HTML::TokeParser
to extract the tags on the page, searches for triggers like
"temp:" and "wind:"
Given the quality of the subsmissions to the ad hoc "elegant script"
competition we had a month ago, I'm sure there are Sluggers out there
who can replace step 2. above with something really clever ;)
Cheers
Rick W
--
Rick Welykochy || Praxis Services Pty Limited
--
SLUG - Sydney Linux Users Group Mailing List - http://www.slug.org.au
To unsubscribe send email to slug-request@nospam.slug.org.au with
unsubscribe in the text