fixing fortuneo listing account

This commit is contained in:
Vincent Paredes 2015-08-17 16:53:59 +02:00 committed by Romain Bignon
commit 51587adea8
2 changed files with 4 additions and 1 deletions

View file

@ -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):

View file

@ -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,