raising incorrecte password when profil is incomplete

This commit is contained in:
Vincent Paredes 2015-04-27 16:56:07 +02:00 committed by Romain Bignon
commit 9749f5c7a8
3 changed files with 9 additions and 3 deletions

View file

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

View file

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

View file

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