Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions internetarchive/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,10 @@ def _scrape(self):
j = r.json()
if j.get('error'):
yield j
if j['total'] is None:
# Unexpected empty response when iterating on cursor
# Retry with same cursor:
continue
num_found = int(j['total'])
if not self._num_found:
self._num_found = num_found
Expand Down