add an error if unable to parse date
This commit is contained in:
parent
cd5ad75928
commit
b0cc8cfacf
1 changed files with 3 additions and 0 deletions
|
|
@ -104,6 +104,9 @@ class TransactionsPage(BasePage):
|
||||||
yy = d.year
|
yy = d.year
|
||||||
|
|
||||||
date = datetime.date(yy, mm, dd)
|
date = datetime.date(yy, mm, dd)
|
||||||
|
else:
|
||||||
|
self.logger.error('Unable to parse date %r' % date)
|
||||||
|
continue
|
||||||
|
|
||||||
t.parse(date, re.sub(r'[ ]+', ' ', raw))
|
t.parse(date, re.sub(r'[ ]+', ' ', raw))
|
||||||
t.amount = Decimal(div.xpath('.//span')[-1].text.strip().replace(' ', '').replace(',', ''))
|
t.amount = Decimal(div.xpath('.//span')[-1].text.strip().replace(' ', '').replace(',', ''))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue