You could give it a try... the Yahoo Weather Service provides an RSS Feed which might help. And assuming that their data is accurate...
http://developer.yahoo.com/weather/
install feedparser for python to help you interpret the results.
Then just a few lines of python will give you the temperature:
Code:
#!/usr/bin/python
import feedparser
url = "http://weather.yahooapis.com/forecastrss"
lctn = "753692"
unit = "c"
url += "?w=%s&u=%s" % (lctn, unit)
feed = feedparser.parse(url)
print feed["items"][0]["yweather_condition"]["temp"]
Here the lctn parameter represents Barcelona... you'll need to find your own location ID using the instructions on the yahoo website.
change the unit to f if you want results in Fahrenheit.
Finally you'll need to
a. find a way to execute the script on a regular basis .. and
b. modify the script to write the data to where you want it... perhaps with the time/date it was requested?
depends on what you want to do with the data I suppose... but you should be able to work it out from here.
Good luck!
Bookmarks