fix ignore of "total" lines

This commit is contained in:
Romain Bignon 2014-05-08 10:20:12 +02:00
commit afd5bba8a1
2 changed files with 2 additions and 2 deletions

View file

@ -47,7 +47,7 @@ class AccountHistory(BasePage):
def get_operations(self):
for form in self.document.xpath('//form[@name="marques"]'):
for tr in form.xpath('.//tbody/tr'):
if tr.attrib.get('class', '') == 'total' or 'style' in tr.attrib:
if 'total' in tr.attrib.get('class', '') or 'style' in tr.attrib:
continue
date = self.parser.tocleanstring(tr.cssselect('td.operation span.DateOperation')[0])

View file

@ -42,7 +42,7 @@ class CardHistory(BasePage):
for tr in form.xpath('.//tbody/tr'):
tds = tr.xpath('./td')
if tr.attrib.get('class', '') in ('total', 'visible-phone') or 'style' in tr.attrib or len(tds) < 3:
if tr.attrib.get('class', '') in ('total gras', 'visible-phone') or 'style' in tr.attrib or len(tds) < 3:
continue
date = self.parser.tocleanstring(tds[0])