From 1d394032ac4d511ae624130e3afa38dca8960c14 Mon Sep 17 00:00:00 2001 From: Maxime Gasselin Date: Wed, 20 Feb 2019 11:32:41 +0100 Subject: [PATCH] [creditdunord] Skip iban return for cards The website seems to create fake iban with the id card (but not reachable with website navigation). --- modules/creditdunord/browser.py | 5 +++-- modules/creditdunord/pages.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/creditdunord/browser.py b/modules/creditdunord/browser.py index 16d849d6dd..e44a9740cc 100644 --- a/modules/creditdunord/browser.py +++ b/modules/creditdunord/browser.py @@ -118,8 +118,9 @@ def get_accounts_list(self): link = self.page.iban_go() for a in [a for a in accounts if a._acc_nb]: - self.location(link + a._acc_nb) - a.iban = self.page.get_iban() + if a.type != Account.TYPE_CARD: + self.location(link + a._acc_nb) + a.iban = self.page.get_iban() return accounts diff --git a/modules/creditdunord/pages.py b/modules/creditdunord/pages.py index 2f05dd8bb3..1a5a98d3cb 100755 --- a/modules/creditdunord/pages.py +++ b/modules/creditdunord/pages.py @@ -180,7 +180,7 @@ def get_labels(self): if CleanText(Dict('label'))(element) in synthesis_labels: synthesis_label = CleanText(Dict('link'))(element).split("/")[-1] if CleanText(Dict('label'))(element) in loan_labels: - loan_label = CleanText(Dict('link'))(element).split("/")[-1] + loan_label = CleanText(Dict('link'))(element).split("/")[-1] return (synthesis_label, loan_label) -- GitLab