order transactions by date to prevent LinearDateGuesser to be duped by the f*cking website
This commit is contained in:
parent
8d38e60f05
commit
0008cf17f1
2 changed files with 8 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue