request.Session()。cookies为空

时间:2019-10-16 00:38:18

标签: python-3.x http cookies https session-cookies

我正在尝试获取cookie,但是对于该网站来说cookie是空的,因为我在另一个网站(例如CodeChef.com)上尝试了该代码,

with requests.Session() as s:
a = s.get('https://auth.strategicdata.com.au/login?site=tmr-admin- 
production', proxies=proxyDict, headers=headers)
print(a.cookies.get_dict())// it is empty
p = s.post('https://auth.strategicdata.com.au/login?site=tmr-admin- 
production', data=payload, proxies=proxyDict, headers=headers)
print(p.cookies.get_dict())//its is empty
print(s.cookies.get_dict())//its is empty

0 个答案:

没有答案