There exist search results where the logic to collect 'history' does not apply and fails with an IndexError. A first and simple approach to this issue is to continue on IndexError and ignore corrupted information of entries.
Change the following lines in handelsregister.py...
113 for i in range(hist_start, len(cells), 3):
114 d['history'].append((cells[i], cells[i+1])) # (name, location)
...to:
113 for i in range(hist_start, len(cells), 3):
114 try:
115 d['history'].append((cells[i], cells[i+1])) # (name, location)
116 except IndexError: # there might be entries where this logic does not apply
117 continue
Alternatively the author(s) should have another look at the results and the parsing.
There exist search results where the logic to collect
'history'
does not apply and fails with anIndexError
. A first and simple approach to this issue is tocontinue
onIndexError
and ignore corrupted information of entries.Change the following lines in
handelsregister.py
......to:
Alternatively the author(s) should have another look at the results and the parsing.