Traditional Culture Encyclopedia - Weather inquiry - Help: get the weather forecast with python
Help: get the weather forecast with python
# Get temperature, humidity, wind power, etc.
Weather _URL_A = "/data/sk/%s.html "
# Get weather conditions, maximum/minimum temperatures, etc.
WEATHER _ URL _ B = "/data/city info/% s . html "
# Get the weather data for the next 7 days
Weather _URL_C = "/weather/%s.shtml "
The %s in the URL refers to the code corresponding to the city. Detailed reference:
blogs.com/toosuo/p/3868004.html
However, some interfaces in this article are no longer available.
Of the three URLs I gave above, the first two directly return data in json format; The third return is a page from which you need to extract the information you want.
- Previous article:How many kilometers is Dongshang Township in Jinggangshan City from Longshi Town?
- Next article:Is Dujiangyan Hongkou drifting open? 2022
- Related articles
- It's so cold Some of these children are barefoot and have no decent quilts.
- Cultural common sense about filial piety
- Twenty-Four Solar Terms and Beginning of Summer Health Preservation Tips
- What weather is the best for taking wedding photos?
- Observe the weather on April 11, 2016 and write a diary
- 2ol6 What's the weather like in Feicheng, Shandong Province today and tomorrow?
- Xishuangbanna weather 65438+ what clothes to wear to play in October?
- How to write a composition about the landscape of Tianchi Lake in Changbai Mountain?
- The average weather in the North Sea
- What is the average temperature in Dubai in a year?