[已解决]报错:Required request body is missing

2020-09-17 11:20:38 浏览数 (1)

问题代码:

代码语言:javascript复制
res = requests.post(getXxxxList_url, headers=headers, data={})

对象网站:

  • angular4
  • apache

通过验证

(cookie,x-??-key)

payload: 空对象(实际登录在network里查看的)

{}

爬取结果:

Required request body is missing

解决方案:

代码语言:javascript复制
import json
import requests

# ...略...

body = {}
res = requests.post(getXxxxList_url, headers=headers, data=json.dumps(body))

0 人点赞