import requests import json url = 'http://apis.juhe.cn/simpleWeather/query' headers={ "Content-Type": "application/x-www-form-urlencoded", "charset":"UTF-8" } data = { "city": "%E4%B8%8A%E6%B5%B7", "key":"bef2ae20fc12a6dd10ebc30e0c4ac659" } res = requests.post(url=url, data=data,headers=headers) print(res.json())
请求天气接口格式,自动化
最新推荐文章于 2022-12-16 09:02:26 发布