I need to retrieve some info from web. For example, I can visit weather.com to search my zip code to get HTML file that contains the temperature or something. I need to make a python script to do this automatically.
I think there are two ways to do this.
- Run wget to download the web page, parse it to get the information I want.
- If the website provides the web service, just run it to get the info.
And these are my questions.
- What function do I use for the web service in python?
- How can I know if a web site provides what web service?
- If web service is not provided, is there a better way than run wget and parse?
If you can give me some examples, that would be much better.