bnporc fix concerning banqueprivee subdomain
This commit is contained in:
parent
71fd2f4a0b
commit
29b6371f9d
2 changed files with 6 additions and 3 deletions
|
|
@ -68,7 +68,8 @@ class BNPParibasBrowser(CompatMixin, JsonBrowserMixin, LoginBrowser):
|
|||
'SEEA-pa01/devServer/seeaserver',
|
||||
'https://mabanqueprivee.bnpparibas.net/fr/espace-prive/comptes-et-contrats\?u=%2FSEEA-pa01%2FdevServer%2Fseeaserver',
|
||||
LoginPage)
|
||||
con_threshold = URL(r'/fr/connexion/100-connexions', ConnectionThresholdPage)
|
||||
con_threshold = URL('/fr/connexion/100-connexions',
|
||||
'/fr/espace-prive/100-connexions.*', ConnectionThresholdPage)
|
||||
accounts = URL('udc-wspl/rest/getlstcpt', AccountsPage)
|
||||
ibans = URL('rib-wspl/rpc/comptes', AccountsIBANPage)
|
||||
history = URL('rop-wspl/rest/releveOp', HistoryPage)
|
||||
|
|
@ -79,13 +80,13 @@ class BNPParibasBrowser(CompatMixin, JsonBrowserMixin, LoginBrowser):
|
|||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(BNPParibasBrowser, self).__init__(*args, **kwargs)
|
||||
self.switch('mabanque')
|
||||
self.do_login()
|
||||
|
||||
def switch(self, subdomain):
|
||||
self.BASEURL = self.BASEURL_TEMPLATE % subdomain
|
||||
|
||||
def do_login(self):
|
||||
self.switch('mabanque')
|
||||
timestamp = lambda: int(time.time() * 1e3)
|
||||
self.login.go(timestamp=timestamp())
|
||||
if self.login.is_here():
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ class LoginPage(JsonPage):
|
|||
|
||||
if error:
|
||||
msg = self.get('message')
|
||||
if error == 201 or error == 21510 or error == 203:
|
||||
if error == 201 or error == 21510 or error == 203 or error == 202:
|
||||
raise BrowserIncorrectPassword(msg)
|
||||
self.logger.debug('Unexpected error at login: "%s" (code=%s)' % (msg, error))
|
||||
|
||||
|
|
@ -112,6 +112,8 @@ class LoginPage(JsonPage):
|
|||
response = self.browser.location(target, data={'AUTH': auth, 'CSRF': csrf})
|
||||
if response.url.startswith('https://pro.mabanque.bnpparibas'):
|
||||
raise self.browser.ProAccount()
|
||||
if response.url.startswith('https://banqueprivee.mabanque.bnpparibas'):
|
||||
self.browser.switch('banqueprivee.mabanque')
|
||||
|
||||
|
||||
class BNPPage(LoggedPage, JsonPage):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue