fix parsing of labels with new crédit agricole website

To determinate what is the index of label column, we have to consider the
'colspan' attribute of header
This commit is contained in:
Romain Bignon 2014-10-28 10:10:11 +01:00
commit d26180c5a8

View file

@ -284,6 +284,8 @@ class TransactionsPage(Page):
heads = tr.findall('th')
for i, head in enumerate(heads):
key = self.parser.tocleanstring(head)
if 'colspan' in head.attrib:
i += int(head.get('colspan')) - 1
if key == u'Débit':
self.COL_DEBIT = i - len(heads)
if key == u'Crédit':