python请求登录显示我的个人资料无法带我的个人资料

时间:2015-05-28 10:30:48

标签: python python-requests

我试图使用Python Request库读取提取配置文件,它再次默认返回登录屏幕,而不是我的配置文件屏幕。这可能是由于缺少验证码。有什么建议?

import sys
import requests


headers = {
    'User-Agent': "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)",
    'Accept-Encoding': 'gzip, deflate',
    'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'
}

loginInfo={
    'session-key' : 'username@gmail.com',
    'session-password' : 'password'
}

URL='https://www.linkedin.com/uas/login-submit'
s=requests.session()
s.post(URL,data=loginInfo,headers=headers)

response=s.get('http://www.linkedin.com/nhome')

# print response.txt

0 个答案:

没有答案