fix detection of card pages
This commit is contained in:
parent
f9c82781ec
commit
33b9ae23be
1 changed files with 4 additions and 4 deletions
|
|
@ -208,16 +208,16 @@ class TransactionsPage(BasePage):
|
||||||
last_debit = None
|
last_debit = None
|
||||||
transactions = []
|
transactions = []
|
||||||
|
|
||||||
|
# check if it's a card page, so by default transactions are not yet debited.
|
||||||
|
if len(self.document.xpath('//div[@class="scrollTbody"]/table//th')) == 6 and is_coming is None:
|
||||||
|
is_coming = True
|
||||||
|
|
||||||
for tr in self.document.xpath('//div[@class="scrollTbody"]/table//tr'):
|
for tr in self.document.xpath('//div[@class="scrollTbody"]/table//tr'):
|
||||||
cols = tr.findall('td')
|
cols = tr.findall('td')
|
||||||
|
|
||||||
if len(cols) < 4:
|
if len(cols) < 4:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# check if it's a card page, so by default transactions are not yet debited.
|
|
||||||
if len(cols) == 6 and is_coming is None:
|
|
||||||
is_coming = True
|
|
||||||
|
|
||||||
col_label = cols[1]
|
col_label = cols[1]
|
||||||
if col_label.find('a') is not None:
|
if col_label.find('a') is not None:
|
||||||
col_label = col_label.find('a')
|
col_label = col_label.find('a')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue