Commit 310db131 authored by Maxime Pommier's avatar Maxime Pommier Committed by Vincent A

[boursorama] Avoid to get 3 years of history for nothing when we get coming transaction

parent f8c49e87
......@@ -338,11 +338,12 @@ class BoursoramaBrowser(RetryLoginBrowser, StatesMixin):
params['movementSearch[toDate]'] = (date.today() + relativedelta(days=40)).strftime('%d/%m/%Y')
params['movementSearch[fromDate]'] = (date.today() - relativedelta(years=3)).strftime('%d/%m/%Y')
params['movementSearch[selectedAccounts][]'] = account._webid
self.location('%s/mouvements' % account.url.rstrip('/'), params=params)
for transaction in self.page.iter_history():
yield transaction
if not coming:
self.location('%s/mouvements' % account.url.rstrip('/'), params=params)
for transaction in self.page.iter_history():
yield transaction
if coming and account.type == Account.TYPE_CHECKING:
elif account.type == Account.TYPE_CHECKING:
self.location('%s/mouvements-a-venir' % account.url.rstrip('/'), params=params)
for transaction in self.page.iter_history(coming=True):
yield transaction
......
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