as ING website sucks, re-login to retry getting investments list
This commit is contained in:
parent
e2ad595413
commit
55f8bbcf2e
1 changed files with 13 additions and 2 deletions
|
|
@ -230,13 +230,24 @@ class IngBrowser(LoginBrowser):
|
|||
}
|
||||
|
||||
# On ASV pages, data maybe not available.
|
||||
for i in range(4):
|
||||
time.sleep(2**i)
|
||||
for i in range(5):
|
||||
if i > 0:
|
||||
self.logger.debug('Investments list empty, retrying in %s seconds...', (2**i))
|
||||
time.sleep(2**i)
|
||||
|
||||
if i > 1:
|
||||
self.do_logout()
|
||||
self.do_login()
|
||||
self.accountspage.go()
|
||||
|
||||
self.accountspage.go(data=data)
|
||||
|
||||
if not self.page.has_error():
|
||||
break
|
||||
|
||||
else:
|
||||
self.logger.warning("Unable to get investments list...")
|
||||
|
||||
if self.page.is_asv:
|
||||
return
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue