From 51587adea8f48d96cddc9e179554684866b1f96c Mon Sep 17 00:00:00 2001 From: Vincent Paredes Date: Mon, 17 Aug 2015 16:53:59 +0200 Subject: [PATCH] fixing fortuneo listing account --- modules/fortuneo/browser.py | 2 +- modules/fortuneo/pages/accounts_list.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/fortuneo/browser.py b/modules/fortuneo/browser.py index 28809bd8..fc448ae4 100644 --- a/modules/fortuneo/browser.py +++ b/modules/fortuneo/browser.py @@ -81,7 +81,7 @@ class Fortuneo(Browser): if self.is_on_page(AccountsList) and self.page.need_reload(): self.location('/ReloadContext?action=1&') - elif self.is_on_page(AccountsList): + elif self.is_on_page(AccountsList) and self.page.need_sms(): raise BrowserIncorrectPassword('Authentification with sms is not supported') def get_investments(self, account): diff --git a/modules/fortuneo/pages/accounts_list.py b/modules/fortuneo/pages/accounts_list.py index 39f8a66b..92ce03fb 100644 --- a/modules/fortuneo/pages/accounts_list.py +++ b/modules/fortuneo/pages/accounts_list.py @@ -237,6 +237,9 @@ class AccountsList(Page): form = self.document.xpath('//form[@name="InformationsPersonnellesForm"]') return len(form) > 0 + def need_sms(self): + return len(self.document.xpath('//div[@id="aidesecuforte"]')) + ACCOUNT_TYPES = {'mes-comptes/compte-courant': Account.TYPE_CHECKING, 'mes-comptes/assurance-vie': Account.TYPE_LIFE_INSURANCE, 'mes-comptes/livret': Account.TYPE_SAVINGS,