带cookie的POST请求

时间:2018-02-14 01:15:51

标签: python post cookies web http-post

我尝试发送带有效负载的帖子请求以自动化条目。网址为:https://gleam.io/wOAtd/air-jordan-iii-free-throw-line

#
payload = {
    email and address
}
headers = {
    "user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36"
}
r1 = requests.get(
    'https://gleam.io/wOAtd/air-jordan-iii-free-throw-line'
)
print("r1", r1.status_code)
r2 = requests.post(
    'https://gleam.io/set-contestant',
    data = payload, cookies = r1.cookies,
    headers = headers)
print("r2", r2.status_code)

我从r1获得200,但从r2获得500。我还该怎么办?如果您提供答案,请说明您在网络中寻找的内容"。

0 个答案:

没有答案