diff --git a/modules/boursorama/browser.py b/modules/boursorama/browser.py index bf0ac5b3..3716ac32 100644 --- a/modules/boursorama/browser.py +++ b/modules/boursorama/browser.py @@ -26,8 +26,8 @@ from collections import defaultdict from weboob.deprecated.browser import StateBrowser, BrowserIncorrectPassword from weboob.capabilities.bank import Account -from .pages import (LoginPage, AccountsList, AccountHistory, CardHistory, UpdateInfoPage, - AuthenticationPage, AccountInvestment, InvestmentDetail) +from .pages import (LoginPage, ProfilIncomplete, AccountsList, AccountHistory, CardHistory, + UpdateInfoPage, AuthenticationPage, AccountInvestment, InvestmentDetail) __all__ = ['Boursorama'] @@ -45,6 +45,7 @@ class Boursorama(StateBrowser): ENCODING = None # refer to the HTML encoding PAGES = {r'.*/connexion/securisation.*': AuthenticationPage, r'.*connexion.phtml.*': LoginPage, + r'.*/connexion/profil-incomplet.phtml.*': ProfilIncomplete, r'.*/comptes/synthese.phtml': AccountsList, r'.*/comptes/banque/detail/mouvements.phtml.*': AccountHistory, r'.*/comptes/banque/cartes/mouvements.phtml.*': CardHistory, diff --git a/modules/boursorama/pages/__init__.py b/modules/boursorama/pages/__init__.py index d9195d15..0366b0f9 100644 --- a/modules/boursorama/pages/__init__.py +++ b/modules/boursorama/pages/__init__.py @@ -22,7 +22,7 @@ from .account_history import AccountHistory from .card_history import CardHistory from .accounts_list import AccountsList -from .login import LoginPage, UpdateInfoPage +from .login import LoginPage, ProfilIncomplete, UpdateInfoPage from .two_authentication import AuthenticationPage from .investment import AccountInvestment, InvestmentDetail @@ -31,6 +31,7 @@ class AccountPrelevement(AccountsList): pass __all__ = ['LoginPage', + 'ProfilIncomplete', 'AccountsList', 'AccountHistory', 'CardHistory', diff --git a/modules/boursorama/pages/login.py b/modules/boursorama/pages/login.py index 39323750..ab3e83cd 100644 --- a/modules/boursorama/pages/login.py +++ b/modules/boursorama/pages/login.py @@ -98,6 +98,10 @@ class LoginPage(Page): self.browser.location(form.attrib['action'], urllib.urlencode(args), no_login=True) +class ProfilIncomplete(Page): + def on_loaded(self): + raise BrowserIncorrectPassword() + class UpdateInfoPage(Page): def on_loaded(self):