diff --git a/modules/bred/bred/browser.py b/modules/bred/bred/browser.py index 2e534b28d3fac952d075355f9180bbfc789c2974..f02167974e558fbf1cedc2ea359d12c7c1cb5103 100644 --- a/modules/bred/bred/browser.py +++ b/modules/bred/bred/browser.py @@ -280,6 +280,7 @@ def get_history(self, account, coming=False): today = date.today() seen = set() offset = 0 + total_transactions = 0 next_page = True end_date = date.today() last_date = None @@ -309,10 +310,11 @@ def get_history(self, account, coming=False): next_page = len(transactions) > 0 offset += 50 + total_transactions += 50 # This assert supposedly prevents infinite loops, # but some customers actually have a lot of transactions. - assert offset < 100000, 'the site may be doing an infinite loop' + assert total_transactions < 50000, 'the site may be doing an infinite loop' @need_login def iter_investments(self, account):