support pagination
This commit is contained in:
parent
c0e3a1d6e2
commit
c207b109ab
4 changed files with 62 additions and 31 deletions
|
|
@ -97,21 +97,20 @@ class CreditMutuelBrowser(BaseBrowser):
|
|||
self.currentSubBank = url.path.lstrip('/').split('/')[0]
|
||||
|
||||
def list_operations(self, page_url):
|
||||
l_ret = []
|
||||
while page_url:
|
||||
if page_url.startswith('/'):
|
||||
self.location(page_url)
|
||||
else:
|
||||
self.location('https://%s/%s/fr/banque/%s' % (self.DOMAIN, self.currentSubBank, page_url))
|
||||
if page_url.startswith('/'):
|
||||
self.location(page_url)
|
||||
else:
|
||||
self.location('https://%s/%s/fr/banque/%s' % (self.DOMAIN, self.currentSubBank, page_url))
|
||||
|
||||
go_next = True
|
||||
while go_next:
|
||||
if not self.is_on_page(OperationsPage):
|
||||
break
|
||||
return
|
||||
|
||||
for op in self.page.get_history():
|
||||
l_ret.append(op)
|
||||
page_url = self.page.next_page_url()
|
||||
yield op
|
||||
|
||||
return l_ret
|
||||
go_next = self.page.go_next()
|
||||
|
||||
def get_history(self, account):
|
||||
transactions = []
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue