bnporc better handle of expired password
This commit is contained in:
parent
b29e91be4d
commit
e0a57153ed
2 changed files with 6 additions and 6 deletions
|
|
@ -24,7 +24,6 @@ from weboob.browser import LoginBrowser, URL, need_login
|
|||
from weboob.capabilities.base import find_object
|
||||
from weboob.capabilities.bank import AccountNotFound
|
||||
from weboob.tools.json import json
|
||||
from weboob.exceptions import BrowserPasswordExpired
|
||||
|
||||
from .pages import LoginPage, AccountsPage, AccountsIBANPage, HistoryPage, TransferInitPage, ConnectionThresholdPage
|
||||
|
||||
|
|
@ -69,7 +68,9 @@ class BNPParibasBrowser(CompatMixin, JsonBrowserMixin, LoginBrowser):
|
|||
'https://mabanqueprivee.bnpparibas.net/fr/espace-prive/comptes-et-contrats\?u=%2FSEEA-pa01%2FdevServer%2Fseeaserver',
|
||||
LoginPage)
|
||||
con_threshold = URL('/fr/connexion/100-connexions',
|
||||
'/fr/espace-prive/100-connexions.*', ConnectionThresholdPage)
|
||||
'/fr/espace-prive/100-connexions.*',
|
||||
'/fr/espace-pro/100-connexions-pro.*',
|
||||
'/fr/systeme/page-indisponible', ConnectionThresholdPage)
|
||||
accounts = URL('udc-wspl/rest/getlstcpt', AccountsPage)
|
||||
ibans = URL('rib-wspl/rpc/comptes', AccountsIBANPage)
|
||||
history = URL('rop-wspl/rest/releveOp', HistoryPage)
|
||||
|
|
@ -91,8 +92,6 @@ class BNPParibasBrowser(CompatMixin, JsonBrowserMixin, LoginBrowser):
|
|||
self.login.go(timestamp=timestamp())
|
||||
if self.login.is_here():
|
||||
self.page.login(self.username, self.password)
|
||||
if self.con_threshold.is_here():
|
||||
raise BrowserPasswordExpired(u'Vous avez atteint le seuil de 100 connexions avec le même code secret. Par mesure de sécurité, veuillez le changer.')
|
||||
|
||||
@need_login
|
||||
def get_accounts_list(self):
|
||||
|
|
|
|||
|
|
@ -27,13 +27,14 @@ from weboob.browser.pages import JsonPage, LoggedPage, HTMLPage
|
|||
from weboob.tools.captcha.virtkeyboard import GridVirtKeyboard
|
||||
from weboob.capabilities.bank import Account
|
||||
from weboob.tools.capabilities.bank.transactions import FrenchTransaction
|
||||
from weboob.exceptions import BrowserIncorrectPassword, BrowserUnavailable
|
||||
from weboob.exceptions import BrowserIncorrectPassword, BrowserUnavailable, BrowserPasswordExpired
|
||||
from weboob.tools.json import json
|
||||
from weboob.tools.date import parse_french_date as Date
|
||||
|
||||
|
||||
class ConnectionThresholdPage(HTMLPage):
|
||||
pass
|
||||
def on_load(self):
|
||||
raise BrowserPasswordExpired(u'Vous avez atteint le seuil de 100 connexions avec le même code secret. Par mesure de sécurité, veuillez le changer.')
|
||||
|
||||
def cast(x, typ, default=None):
|
||||
try:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue