diff --git a/modules/boursorama/browser.py b/modules/boursorama/browser.py index 5a522636abe8d555b9252f60d738005e6945fd1a..4fb368365b31710065b6cdeabeca441a96340c34 100644 --- a/modules/boursorama/browser.py +++ b/modules/boursorama/browser.py @@ -338,11 +338,12 @@ def get_regular_transactions(self, account, coming): params['movementSearch[toDate]'] = (date.today() + relativedelta(days=40)).strftime('%d/%m/%Y') params['movementSearch[fromDate]'] = (date.today() - relativedelta(years=3)).strftime('%d/%m/%Y') params['movementSearch[selectedAccounts][]'] = account._webid - self.location('%s/mouvements' % account.url.rstrip('/'), params=params) - for transaction in self.page.iter_history(): - yield transaction + if not coming: + self.location('%s/mouvements' % account.url.rstrip('/'), params=params) + for transaction in self.page.iter_history(): + yield transaction - if coming and account.type == Account.TYPE_CHECKING: + elif account.type == Account.TYPE_CHECKING: self.location('%s/mouvements-a-venir' % account.url.rstrip('/'), params=params) for transaction in self.page.iter_history(coming=True): yield transaction