<input type="text" class="inputtext" name="email" id="email" value="" tabindex="1">
是郵箱Python3我將如何登錄使用Facebook的請求
<input type="password" class="inputtext" name="pass" id="pass" tabindex="2">
的密碼箱
<input value="Connexion" tabindex="4" type="submit" id="u_0_v">
被提交按鈕 現在......我有此腳本運行,但我仍然可以「T設法登錄(我得到相同的登錄頁面:facebook.com)
import requests
from bs4 import BeautifulSoup
body = {'email':'[email protected]','pass':'xxxxx',}
con = requests.post('https://www.facebook.com', data=body)
s = BeautifulSoup(con.content)
print (s)
我必須在通過‘提交按鈕’在體內{}。我以爲我應該包括它,但沒有提交按鈕的名稱,所以我不知道如何將它包含在body {}中。感謝您的幫助
@alfasin你認爲你可以幫助我嗎? :) –
你搜索stackoverflow和讀取https://stackoverflow.com/questions/11472148/how-can-i-log-in-to-facebook-using-python-requests-urllib3例如? –
我在這裏回覆:http://stackoverflow.com/a/31497720/1057429 – alfasin