diff --git a/modules/boursorama/browser.py b/modules/boursorama/browser.py index 4fb368365b31710065b6cdeabeca441a96340c34..6b27d782b4e7d6ed0d852574c10d41afe97cd840 100644 --- a/modules/boursorama/browser.py +++ b/modules/boursorama/browser.py @@ -333,20 +333,18 @@ def get_history(self, account, coming=False): return self.get_regular_transactions(account, coming) def get_regular_transactions(self, account, coming): - # We look for 3 years of history. - params = {} - 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 if not coming: + # We look for 3 years of history. + params = {} + 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 - 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 + # Note: Checking accounts have a 'Mes prélèvements à venir' tab, + # but these transactions have no date anymore so we ignore them. def get_card_transactions(self, account, coming): # All card transactions can be found in the CSV (history and coming), diff --git a/modules/boursorama/pages.py b/modules/boursorama/pages.py index 6306dbad5880480de84a9e95fd904fb57cdbae6c..63b3c84819d3f50092f3953694654384eee75362 100644 --- a/modules/boursorama/pages.py +++ b/modules/boursorama/pages.py @@ -460,7 +460,6 @@ def next_page(self): class item(ItemElement): klass = Transaction - obj_date = Date(Attr('.//time', 'datetime')) obj_amount = CleanDecimal('.//div[has-class("list__movement__line--amount")]', replace_dots=True) obj_category = CleanText('.//span[has-class("category")]') obj__account_name = CleanText('.//span[contains(@class, "account__name-xs")]', default=None)