https://zhuanlan.zhihu.com/p/26369491
import requests
r = requests.get('http://www.weather.com.cn/data/sk/101020100.html')
r.encoding = 'utf-8'
print (r.json()'weatherinfo', r.json()'weatherinfo', r.json()'weatherinfo')
import requests
url = f'http://wthrcdn.etouch.cn/weather_mini?citykey=101282104'
res = requests.get(url)
res.encoding = 'utf-8'
res_json = res.json()
data = res_json['data']
city = f"城市:{data['city']}"
today = data'forecast'
date = f"日期:{today['date']}"
now = f"实时温度:{data['wendu']}度"
temperature = f"温度:{today['high']} {today['low']}"
fengxiang = f"风向:{today['fengxiang']}"
wtype = f"天气:{today['type']}"
tips = f"贴士:{data['ganmao']}"
result = city+";" + date +";" + now +";n" + temperature +";" + fengxiang+";" + wtype +";n" + tips
print(result)