由于某些原因,我无法使用requests.Session()函数来保存登录凭据。我当前的代码不工作,我不知道为什么,有人能帮我纠正代码和解释所需的更改吗?我不想一个网站一个网站地不断寻求帮助
headers = {
'Content-type': 'text/html',
'User-Agent':'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.97 Safari/537.36',
'origin':'https://stockinvest.us',
'referer':'https://stockinvest.us'
}
data = {'email':'user-email', 'password: 'user-password'}
with requests.Session() as s:
login = s.post('https://stockinvest.us/login', data=data, headers=headers)
s.cookies
r = s.get('https://stockinvest.us/profile/edit')
目前没有回答
相关问题 更多 >
编程相关推荐