From 0f93a080b02827466ee9c4a3f283998725fe66dd Mon Sep 17 00:00:00 2001 From: Baptiste Delpey Date: Mon, 3 Aug 2015 14:18:41 +0200 Subject: [PATCH] boursorama fix duplicate accounts --- modules/boursorama/pages/accounts_list.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/boursorama/pages/accounts_list.py b/modules/boursorama/pages/accounts_list.py index c5d092b3..2461a19b 100644 --- a/modules/boursorama/pages/accounts_list.py +++ b/modules/boursorama/pages/accounts_list.py @@ -19,6 +19,7 @@ # along with weboob. If not, see . +import re from decimal import Decimal from weboob.capabilities.bank import Account @@ -63,6 +64,10 @@ class AccountsList(Page): try: account._link_id = td.xpath('.//a')[0].get('href') + # Try to use account._link_id for account.id to prevent duplicate accounts + currentCB = re.search('currentCB=(.*)', account._link_id) + if currentCB: + account.id = currentCB.group(1) except KeyError: pass