python-requests 如何通过 linkedin 验证?

我想抓取linkedin上的页面,但如下代码却无法通过登录验证:

#/usr/bin/env python3  
import requests  
from bs4 import BeautifulSoup  

payload = {  
'session-key': '我的账户',  
'session-password': '我的密码'  
}  

URL = 'https://www.linkedin.com/uas/login?goback=&trk=hb_signin'  
s = requests.session()  
s.post(URL, data=payload)  

r = s.get('http://www.linkedin.com/nhome')  
soup = BeautifulSoup(r.text)  
print(soup)

请问哪里出了问题?

1 comments