Add support for another version of Credit Agricole
Both versions are present, for different regions.
This commit is contained in:
parent
e6e95d64ca
commit
0942c08d55
1 changed files with 12 additions and 4 deletions
|
|
@ -25,12 +25,20 @@ class AccountsList(CragrBasePage):
|
|||
|
||||
def get_list(self):
|
||||
l = []
|
||||
|
||||
for div in self.document.getiterator('div'):
|
||||
if div.attrib.get('class', '') == 'dv' and div.getchildren()[0].tag == 'br':
|
||||
if div.attrib.get('class', '') == 'dv' and div.getchildren()[0].tag in ('a', 'br'):
|
||||
account = Account()
|
||||
account.label = div.find('a').text.strip()
|
||||
account.id = div.findall('br')[1].tail.strip()
|
||||
s = div.find('div').find('span').find('b').text
|
||||
if div.getchildren()[0].tag == 'a':
|
||||
# This is at least present on CA Nord-Est
|
||||
account.label = ' '.join(div.find('a').text.split()[:-1])
|
||||
account.id = div.find('a').text.split()[-1]
|
||||
s = div.find('div').find('b').find('span').text
|
||||
else:
|
||||
# This is at least present on CA Toulouse
|
||||
account.label = div.find('a').text.strip()
|
||||
account.id = div.findall('br')[1].tail.strip()
|
||||
s = div.find('div').find('span').find('b').text
|
||||
balance = u''
|
||||
for c in s:
|
||||
if c.isdigit():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue