From e7fdd72e31aae0bc5b4e0c8492146ff49cb6d43a Mon Sep 17 00:00:00 2001 From: Maxime Pommier Date: Wed, 19 Jun 2019 10:44:23 +0200 Subject: [PATCH] [axabanque] Get the real card number --- modules/axabanque/pages/bank.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/axabanque/pages/bank.py b/modules/axabanque/pages/bank.py index eab743f4ab..2155155462 100644 --- a/modules/axabanque/pages/bank.py +++ b/modules/axabanque/pages/bank.py @@ -197,12 +197,12 @@ def get_list(self): break # get accounts id - account.id = args['paramNumContrat'] + args.get('paramNumContrat', '') + account.id = args['paramNumCompte'] + args.get('paramNumContrat', '') if 'Visa' in account.label: - card_id = re.search('(\d+)', box.xpath('./td[2]')[0].text.strip()) - if card_id: - account.id += card_id.group(1) + account.number = Regexp(CleanText('./td[contains(@class,"libelle")]', replace=[(' ', ''), ('x', 'X')]), r'(X{12}\d{4})')(box) + account.id += Regexp(CleanText('./td[contains(@class,"libelle")]'), r'(\d+)')(box) + if u'Valorisation' in account.label or u'Liquidités' in account.label: account.id += args[next(k for k in args.keys() if "_idcl" in k)].split('Jsp')[-1] -- GitLab