bnporc fall back on old website for pro accounts
This commit is contained in:
parent
4477c32e9c
commit
94cb1c4e21
3 changed files with 18 additions and 3 deletions
|
|
@ -74,6 +74,13 @@ class BNPParibasBrowser(CompatMixin, JsonBrowserMixin, LoginBrowser):
|
|||
history = URL('rop-wspl/rest/releveOp', HistoryPage)
|
||||
transfer_init = URL('virement-wspl/rest/initialisationVirement', TransferInitPage)
|
||||
|
||||
class ProAccount(Exception):
|
||||
pass
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(BNPParibasBrowser, self).__init__(*args, **kwargs)
|
||||
self.do_login()
|
||||
|
||||
def switch(self, subdomain):
|
||||
self.BASEURL = self.BASEURL_TEMPLATE % subdomain
|
||||
|
||||
|
|
|
|||
|
|
@ -109,7 +109,9 @@ class LoginPage(JsonPage):
|
|||
# XXX useless ?
|
||||
csrf = self.generate_token()
|
||||
|
||||
self.browser.location(target, data={'AUTH': auth, 'CSRF': csrf})
|
||||
response = self.browser.location(target, data={'AUTH': auth, 'CSRF': csrf})
|
||||
if response.url.startswith('https://pro.mabanque.bnpparibas'):
|
||||
raise self.browser.ProAccount()
|
||||
|
||||
|
||||
class BNPPage(LoggedPage, JsonPage):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue