fix parsing of CEL accounts
This commit is contained in:
parent
9ce8385e3e
commit
17d2c732a8
1 changed files with 7 additions and 1 deletions
|
|
@ -130,10 +130,16 @@ class TransactionsPage(BasePage):
|
|||
def get_history(self, date_guesser):
|
||||
i = 0
|
||||
for tr in self.document.xpath('//table[@class="ca-table"]//tr'):
|
||||
parent = tr.getparent()
|
||||
while parent is not None and parent.tag != 'table':
|
||||
parent = parent.getparent()
|
||||
|
||||
if parent.attrib.get('class', '') != 'ca-table':
|
||||
continue
|
||||
|
||||
if tr.attrib.get('class', '') == 'tr-thead':
|
||||
for i, head in enumerate(tr.findall('th')):
|
||||
key = self.parser.tocleanstring(head)
|
||||
print '%r = %s' % (key, i)
|
||||
if key == u'Débit':
|
||||
self.COL_DEBIT = i
|
||||
if key == u'Crédit':
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue