From 76919d4f66083c8fa1f91da606dacaf816382319 Mon Sep 17 00:00:00 2001 From: Maxime Gasselin Date: Mon, 19 Nov 2018 15:19:58 +0100 Subject: [PATCH] [creditmutuel] Skip some cards MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some undesirable cards get the precedent xpath condition. The criteria is now if there is coming. Ex: 'Dépenses de novembre'. Closes: 28173@sibi 8134@zendesk --- modules/creditmutuel/pages.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/creditmutuel/pages.py b/modules/creditmutuel/pages.py index 2ec627b2f2..f09d8ef6d3 100644 --- a/modules/creditmutuel/pages.py +++ b/modules/creditmutuel/pages.py @@ -1842,7 +1842,8 @@ class item(ItemElement): klass = Account def condition(self): - return CleanText('.//div[1]/p')(self) == 'Active' and self.el.xpath('.//tr[1]/td/a[contains(@id,"C:more-card")]') + # Numerous cards are not differed card, we keep the card only if there is a coming + return CleanText('.//div[1]/p')(self) == 'Active' and 'Dépenses' in CleanText('.//tr[1]/td/a[contains(@id,"C:more-card")]')(self) obj_balance = 0 obj_type = Account.TYPE_CARD -- GitLab