0

I'd like a program that reads through one or more weather web pages and records information from them on a daily (or even hourly) basis. Is this kind of thing possible at all to create with python?

(Alternatively, if anyone knows of a program that already does this, or a weather site that has a really good archive or something, that would be great to know too. Although I'd still like to know if it is, in principle, possible with python!)

2
Contributors
2
Replies
3
Views
10 Years
Discussion Span
Last Post by aot
0

Sure!

What you need is the urllib / urllib2

An example would be:

import urllib
abc=urllib.urlopen("http://www.something.com")
StrA=abc.read()
print StrA

# urllib2 is just more recent and has more stability I guess

Module - urllib

Alternatively, there is a module available called PyMETAR. It shows weather info (VERY detailed weather info) from http://www.noaa.gov/ and http://www.weather.gov/

See the site here: http://www.schwarzvogel.de/software-pymetar.shtml

Or alternatively install the package python-pymetar (If on *nix)

0

Oooh, wow. I honestly didn't expect to get an answer in the positive here. Thanks, I'll try them out!

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.