requests请求重定向后获取headers

requests请求重定向后,获取重定向地址的headers,cookie

import requests

response = requests.post(url, data, headers, verify=False)

for his in response.history:
    print(his.headers)
    print(his.headers['Set-Cookie'])
    print(his.cookies)

你可能感兴趣的:(python,python)