diff --git a/modules/bforbank/browser.py b/modules/bforbank/browser.py index ae24f2b30fb19b405c260426add15acb1e4c41b1..efc20b1f4af70f231f84f97661d175a69aa9a281 100644 --- a/modules/bforbank/browser.py +++ b/modules/bforbank/browser.py @@ -67,7 +67,7 @@ class BforbankBrowser(TwoFactorBrowser): ) loan_history = URL('/espace-client/livret/consultation.*', LoanHistoryPage) history = URL('/espace-client/consultation/operations/.*', HistoryPage) - coming = URL(r'/espace-client/consultation/operationsAVenir/(?P\d+)$', HistoryPage) + coming = URL(r'/espace-client/consultation/operationsAVenir/(?P[^/]+)$', HistoryPage) card_history = URL('espace-client/consultation/encoursCarte/.*', CardHistoryPage) card_page = URL(r'/espace-client/carte/(?P\d+)$', CardPage) @@ -371,7 +371,7 @@ def get_history(self, account): @need_login def get_coming(self, account): if account.type == Account.TYPE_CHECKING: - self.coming.go(account=account.id) + self.coming.go(account=account._url_code) return self.page.get_operations() elif account.type == Account.TYPE_CARD: self.location(account.url.replace('operations', 'encoursCarte') + '/%s' % account._index) diff --git a/modules/bforbank/pages.py b/modules/bforbank/pages.py index 90e1b80164b60e8f59f33e2aa870d139307c7254..dbcdac287864f3f1b98569ebbe078b7e75da433a 100644 --- a/modules/bforbank/pages.py +++ b/modules/bforbank/pages.py @@ -175,6 +175,8 @@ def obj_url(self): path = Attr('.', 'data-urlcatitre')(self) return urljoin(self.page.url, path) + # Looks like a variant of base64: ASKHJLHWF272jhk22kjhHJQ1_ufad892hjjj122j348= + obj__url_code = Regexp(Field('url'), r'/espace-client/consultation/operations/(.*)', default=None) obj__card_balance = CleanDecimal('./td//div[@class="synthese-encours"][last()]/div[2]', default=None) def obj_balance(self):