Commit 0008cf17 authored by Romain Bignon's avatar Romain Bignon

order transactions by date to prevent LinearDateGuesser to be duped by the f*cking website

parent 8d38e60f
......@@ -175,7 +175,7 @@ class Cragr(BaseBrowser):
for tr in self.page.get_history(date_guesser):
yield tr
else:
url = account._link
url = self.page.get_order_by_date_url()
while url:
self.location(url)
......
......@@ -245,6 +245,13 @@ class TransactionsPage(BasePage):
return None
def get_order_by_date_url(self):
try:
link = self.document.xpath('//table[@class="ca-table"]/thead//a[text()="Date"]')[0].attrib['href']
except IndexError:
link = self.url
return link
COL_DATE = 0
COL_TEXT = 1
COL_DEBIT = None
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment