paypal: Ignore "empty" rows

This commit is contained in:
Laurent Bachelier 2013-02-12 16:54:09 +01:00
commit 4ed53b5de9

View file

@ -262,6 +262,9 @@ class HistoryPage(BasePage):
'September', 'October', 'November', 'December']
date_format, time_format, months = self.guess_format()
for row in self.document.xpath('//table[@id="transactionTable"]/tbody/tr'):
if row.xpath('.//td') < 5:
continue
amount = row.xpath('.//td[@headers="gross"]')[-1].text_content().strip()
if re.search('\d', amount):
currency = Account.get_currency(amount)