From 6063964c68969746f66e1b5fd49b91afff35e07d Mon Sep 17 00:00:00 2001 From: Romain Bignon Date: Wed, 21 Jan 2015 10:16:13 +0100 Subject: [PATCH] ignore moneycenter accounts --- modules/boursorama/pages/accounts_list.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/boursorama/pages/accounts_list.py b/modules/boursorama/pages/accounts_list.py index c5377695..0c56d01d 100644 --- a/modules/boursorama/pages/accounts_list.py +++ b/modules/boursorama/pages/accounts_list.py @@ -73,7 +73,7 @@ class AccountsList(Page): for a in td.getiterator('a'): # For normal account, two "account-more-actions" # One for the account, one for the credit card. Take the good one - if "mouvements.phtml" in a.get('href') and "/cartes/" not in a.get('href'): + if 'href' in a.attrib and "mouvements.phtml" in a.get('href') and "/cartes/" not in a.get('href'): account._link_id = a.get('href') elif td.get('class', '') == 'account-number': @@ -93,8 +93,7 @@ class AccountsList(Page): account.balance = Decimal(balance) else: account.balance = Decimal(0) - else: # because of some weird useless - if account.id is not None: + if account.id is not None and (not account._link_id or not 'moneycenter' in account._link_id): yield account