diff --git a/modules/ing/browser.py b/modules/ing/browser.py index 4726956d..733c9e86 100644 --- a/modules/ing/browser.py +++ b/modules/ing/browser.py @@ -105,21 +105,17 @@ class IngBrowser(LoginBrowser): self.logger.info('There is no history for this account') return - index = 0 # index, we get always the same page, but with more data hashlist = [] while True: - i = index - for transaction in self.page.get_transactions(index=index): + for transaction in self.page.get_transactions(): transaction.id = hashlib.md5(transaction._hash).hexdigest() while transaction.id in hashlist: transaction.id = hashlib.md5(transaction.id + "1").hexdigest() hashlist.append(transaction.id) - i += 1 yield transaction # if there is no more transactions, it is useless to continue - if i == index or self.page.islast(): + if self.page.islast(): return - index = i data = {"AJAX:EVENTS_COUNT": 1, "AJAXREQUEST": "_viewRoot", "autoScroll": "", diff --git a/modules/ing/pages/accounts_list.py b/modules/ing/pages/accounts_list.py index 6ca08d73..eba47ec8 100644 --- a/modules/ing/pages/accounts_list.py +++ b/modules/ing/pages/accounts_list.py @@ -133,7 +133,7 @@ class AccountsList(LoggedPage, HTMLPage): @method class get_transactions(ListElement): - item_xpath = '//table' + item_xpath = '//div[@class="temporaryTransactionList"]//table' class item(ItemElement): klass = Transaction @@ -150,9 +150,6 @@ class AccountsList(LoggedPage, HTMLPage): def condition(self): if self.el.find('.//td[@class="date"]') is None: return False - if self.page.i < self.env['index']: - self.page.i += 1 - return False return True def get_history_jid(self):