From e1e20a44fe5a433ee3751b72e5890ff167873b9e Mon Sep 17 00:00:00 2001 From: Romain Bignon Date: Sat, 4 Feb 2012 12:38:33 +0100 Subject: [PATCH] strip agency and key from account IDs --- modules/bnporc/pages/accounts_list.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/bnporc/pages/accounts_list.py b/modules/bnporc/pages/accounts_list.py index 763ae5350a..5201429c52 100644 --- a/modules/bnporc/pages/accounts_list.py +++ b/modules/bnporc/pages/accounts_list.py @@ -42,6 +42,9 @@ def get_list(self): if not 'class' in tr.attrib and tr.find('td') is not None and tr.find('td').attrib.get('class', '') == 'typeTitulaire': account = Account() account.id = tr.xpath('.//td[@class="libelleCompte"]/input')[0].attrib['id'][len('libelleCompte'):] + if len(str(account.id)) == 23: + account.id = str(account.id)[5:21] + account.label = tr.xpath('.//td[@class="libelleCompte"]/a')[0].text.strip() tds = tr.findall('td') -- GitLab