我想使用Python腳本登錄到我的銀行帳戶,以進一步廢除我做的交易。我讀了很多,似乎它並不複雜,但我沒有成功登錄。我認爲這個問題是,當我發佈我的表單時,我錯過了一個由?我不知道如何檢索它。使用Python登錄,以安全的網站與令牌
這裏是我的示例代碼:
import requests
s = requests.Session()
s.headers.update({
'User-agent': "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.80 Safari/537.36",
})
url_identification = 'https://accweb.mouv.desjardins.com/identifiantunique/identification'
url_identification_process = 'https://accweb.mouv.desjardins.com/identifiantunique/identification/identificationProcess'
login_data = {
'fnMemoriserUtilisateurActive': '0',
'InfoPosteRaa': {},
'OtherIdRaa': {},
'nbrCartesMemorisees':1,
'codeUtilisateur':xxxxxxxxxx,
'description':{},
'_tk':{},
'infoPosteClient':{}
}
r = s.get(url_identification)
r = s.post(url_identification_process, data=login_data)
print r.text
我的崗位我重定向到url_identification
網頁,因爲我不能夠有正確的令牌。任何想法如何我可以檢索它?我不知道它是如何產生的,並且因爲它是一個銀行網站,恐怕是sadely不可能:(
非常感謝!我會盡快嘗試。事實上,我正在使用Python來快速構建原型。我想爲最終項目使用.NET解決方案。 – GuillaumeA