diff --git a/modules/bforbank/browser.py b/modules/bforbank/browser.py index 891ca7340bd67584fc9f76c226805fa3ec3551b9..54bec9e1b2cd58d66f9c54b4996c455ad8685cf7 100644 --- a/modules/bforbank/browser.py +++ b/modules/bforbank/browser.py @@ -111,7 +111,7 @@ def iter_accounts(self): cards = self.page.get_cards(account.id) account._cards = cards if cards: - self.location(account.url.replace('tableauDeBord', 'encoursCarte') + '/0') + self.location(account.url.replace('operations', 'encoursCarte') + '/0') indexes = dict(self.page.get_card_indexes()) for card in cards: @@ -122,9 +122,9 @@ def iter_accounts(self): card._checking_account = account card._index = indexes[card.number] - self.location(account.url.replace('tableauDeBord', 'encoursCarte') + '/%s' % card._index) + self.location(account.url.replace('operations', 'encoursCarte') + '/%s' % card._index) if self.page.get_debit_date().month == (datetime.date.today() + relativedelta(months=1)).month: - self.location(account.url.replace('tableauDeBord', 'encoursCarte') + '/%s?month=1' % card._index) + self.location(account.url.replace('operations', 'encoursCarte') + '/%s?month=1' % card._index) card.balance = 0 card.coming = self.page.get_balance() assert not empty(card.coming) @@ -134,11 +134,6 @@ def iter_accounts(self): return iter(self.accounts) - def _get_card_transactions(self, account): - self.location(account.url.replace('tableauDeBord', 'encoursCarte') + '/%s?month=1' % account._index) - assert self.card_history.is_here() - return self.page.get_operations() - @need_login def get_history(self, account): if account.type == Account.TYPE_LOAN: @@ -161,7 +156,7 @@ def get_history(self, account): return self.spirica.iter_history(account) if account.type != Account.TYPE_CARD: - self.location(account.url.replace('tableauDeBord', 'operations')) + self.location(account.url) assert self.history.is_here() or self.loan_history.is_here() transactions_list = [] if account.type == Account.TYPE_CHECKING: @@ -177,7 +172,7 @@ def get_history(self, account): # for summary transactions, the transactions must be on both accounts: # negative amount on checking account, positive on card account transactions = [] - self.location(account.url.replace('tableauDeBord', 'encoursCarte') + '/%s?month=1' % account._index) + self.location(account.url.replace('operations', 'encoursCarte') + '/%s?month=1' % account._index) if self.page.get_debit_date().month == (datetime.date.today() - relativedelta(months=1)).month: transactions = list(self.page.get_operations()) summary = self.page.create_summary() @@ -191,10 +186,10 @@ def get_coming(self, account): self.coming.go(account=account.id) return self.page.get_operations() elif account.type == Account.TYPE_CARD: - self.location(account.url.replace('tableauDeBord', 'encoursCarte') + '/%s' % account._index) + self.location(account.url.replace('operations', 'encoursCarte') + '/%s' % account._index) transactions = list(self.page.get_operations()) if self.page.get_debit_date().month == (datetime.date.today() + relativedelta(months=1)).month: - self.location(account.url.replace('tableauDeBord', 'encoursCarte') + '/%s?month=1' % account._index) + self.location(account.url.replace('operations', 'encoursCarte') + '/%s?month=1' % account._index) transactions += list(self.page.get_operations()) return sorted_transactions(transactions) else: