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,