From a8d2d86c6e4e5f6e2da60c5428f0e156a974b461 Mon Sep 17 00:00:00 2001 From: Romain Bignon Date: Thu, 21 Mar 2013 12:35:13 +0100 Subject: [PATCH] the fucking columns heads are not same size than data columns --- modules/cragr/web/pages.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/cragr/web/pages.py b/modules/cragr/web/pages.py index 5d552722..0f1b0a99 100644 --- a/modules/cragr/web/pages.py +++ b/modules/cragr/web/pages.py @@ -138,12 +138,13 @@ class TransactionsPage(BasePage): continue if tr.attrib.get('class', '') == 'tr-thead': - for i, head in enumerate(tr.findall('th')): + heads = tr.findall('th') + for i, head in enumerate(heads): key = self.parser.tocleanstring(head) if key == u'Débit': - self.COL_DEBIT = i + self.COL_DEBIT = i - len(heads) if key == u'Crédit': - self.COL_CREDIT = i + self.COL_CREDIT = i - len(heads) if key == u'Libellé': self.COL_TEXT = i