import json import requests body = { 'key': 'Sjwtl3Xb6hrERaxfh', 'location': '北京' } url ='https://api.seniverse.com/v3/weather/daily.json' result = requests.get(url=url, params=body, timeout=3) res = json.loads(result.text, encoding='utf-8') print(res)