Python爬取豆瓣网表单提交登陆


import requests
headers={
    'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.146 Safari/537.36'
}
params={
    'source':'index_nav',
    'form_email':'xxxxx',
    'form_password':'xxxxx'
}
url="https://www.douban.com/accounts/login"
req=requests.post(url=url,headers=headers,data=params)
print(req.text)

你可能感兴趣的:(Python爬取豆瓣网表单提交登陆)