definitively fix the fucking infinite loop
This commit is contained in:
parent
c71576b7ae
commit
a5f32bbd1b
1 changed files with 8 additions and 5 deletions
|
|
@ -120,17 +120,20 @@ 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()
|
||||||
i = 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 = []
|
||||||
for transaction in self.page.get_transactions(i):
|
i = index
|
||||||
|
for transaction in self.page.get_transactions(index):
|
||||||
while transaction.id in hashlist:
|
while transaction.id in hashlist:
|
||||||
transaction.id = hashlib.md5(transaction.id + "1").hexdigest()
|
transaction.id = hashlib.md5(transaction.id + "1").hexdigest()
|
||||||
hashlist.append(transaction.id)
|
hashlist.append(transaction.id)
|
||||||
i += 1
|
i += 1
|
||||||
yield transaction
|
yield transaction
|
||||||
if self.page.islast():
|
# if there is no more transactions, it is useless to continue
|
||||||
|
if i == index or self.page.islast():
|
||||||
return
|
return
|
||||||
|
index = i
|
||||||
data = {"AJAX:EVENTS_COUNT": 1,
|
data = {"AJAX:EVENTS_COUNT": 1,
|
||||||
"AJAXREQUEST": "_viewRoot",
|
"AJAXREQUEST": "_viewRoot",
|
||||||
"autoScroll": "",
|
"autoScroll": "",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue