diff --git a/modules/boursorama/pages/accounts_list.py b/modules/boursorama/pages/accounts_list.py index f90c829f..c5d092b3 100644 --- a/modules/boursorama/pages/accounts_list.py +++ b/modules/boursorama/pages/accounts_list.py @@ -50,6 +50,17 @@ class AccountsList(Page): break account.type = Account.TYPE_CARD account.label, account.id = [s.strip() for s in self.parser.tocleanstring(td).rsplit('-', 1)] + + # Sometimes there is text after the card number: + # + # CARTE PREMIER + #
MACHIN BIDULE TRUC - 1111********1111 + # + #
+ # Son échéance est le 31/03/2015.
En savoir plus
+ # So we have to remove all the shit after it. + account.id = account.id.split(' ')[0] + try: account._link_id = td.xpath('.//a')[0].get('href') except KeyError: