python爬虫post请求中的data参数怎么接受json格式的list
展开全部
我举个例子你照着改吧
import requests
url = "https://192.168.0.1:9999/postdata"
dict_json = {
"version": "1.0",
"data": [1, 2, 3, 4]
}
r = requests.post(url=url, json=dict_json)
import requests
url = "https://192.168.0.1:9999/postdata"
dict_json = {
"version": "1.0",
"data": [1, 2, 3, 4]
}
r = requests.post(url=url, json=dict_json)
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询