fix crash on ASV accounts history
This commit is contained in:
parent
f7d7240c09
commit
61f8ab8920
2 changed files with 9 additions and 0 deletions
|
|
@ -120,6 +120,10 @@ class Ing(BaseBrowser):
|
||||||
self.location(self.accountspage, urllib.urlencode(data))
|
self.location(self.accountspage, urllib.urlencode(data))
|
||||||
self.where = "history"
|
self.where = "history"
|
||||||
jid = self.page.get_history_jid()
|
jid = self.page.get_history_jid()
|
||||||
|
if jid is None:
|
||||||
|
self.logger.info('There is no history for this account')
|
||||||
|
return
|
||||||
|
|
||||||
index = 0 # index, we get always the same page, but with more informations
|
index = 0 # index, we get always the same page, but with more informations
|
||||||
while 1:
|
while 1:
|
||||||
hashlist = []
|
hashlist = []
|
||||||
|
|
|
||||||
|
|
@ -117,6 +117,11 @@ class AccountsList(BasePage):
|
||||||
yield op
|
yield op
|
||||||
|
|
||||||
def get_history_jid(self):
|
def get_history_jid(self):
|
||||||
|
span = self.document.xpath('//span[@id="index:panelASV"]')
|
||||||
|
if len(span) > 1:
|
||||||
|
# Assurance Vie, we do not support this kind of account.
|
||||||
|
return None
|
||||||
|
|
||||||
span = self.document.xpath('//span[starts-with(@id, "index:j_id")]')[0]
|
span = self.document.xpath('//span[starts-with(@id, "index:j_id")]')[0]
|
||||||
jid = span.attrib['id'].split(':')[1]
|
jid = span.attrib['id'].split(':')[1]
|
||||||
return jid
|
return jid
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue