From 4bf3557e8d09abde76c554f3388c1e8d7fcc3a96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Sobucki?= <168-ssobucki@users.noreply.gitlab.budget-insight.com> Date: Thu, 21 Jan 2021 09:57:27 +0100 Subject: [PATCH] [boursorama] Fix: changed condition to filter out insurances There's a new insurance '/assurance/habitation' that was not filtered out in iter_accounts. These insurances are all located under this route 'assurance/', so we can use this as a condition. --- modules/boursorama/pages.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/modules/boursorama/pages.py b/modules/boursorama/pages.py index cf15f76507..396bb8731d 100644 --- a/modules/boursorama/pages.py +++ b/modules/boursorama/pages.py @@ -327,13 +327,8 @@ class item(ItemElement): def condition(self): # Ignore externally aggregated accounts and insurances: - return ( - not self.is_external() - and not re.search( - 'automobile|assurance/protection|assurance/comptes|assurance/famille', - Field('url')(self) - ) - ) + # We need to use 'assurance/' as a filter because using 'assurance' would filter out life insurance accounts + return not self.is_external() and 'assurance/' not in Field('url')(self) obj_label = CleanText('.//a[has-class("account--name")] | .//div[has-class("account--name")]') obj_currency = FrenchTransaction.Currency('.//a[has-class("account--balance")]') -- GitLab