Convert iter_bills and postpredown

This commit is contained in:
Florent 2014-04-01 10:28:18 +02:00
commit b79215733c
2 changed files with 21 additions and 38 deletions

View file

@ -229,13 +229,7 @@ class IngBrowser(LoginBrowser):
"transfer_issuer_radio": subscription.id
}
self.billpage.go(data=data)
while True:
for bill in self.page.iter_bills(subscription.id):
yield bill
if self.page.islast():
return
self.page.next_page()
return self.page.iter_bills(subid=subscription.id)
def predownload(self, bill):
self.page.postpredown(bill._localid)
self.page.postpredown(localid=bill._localid)