Skip to content

Commit

Permalink
Search._scrape() verify that num_found is an int
Browse files Browse the repository at this point in the history
On line 160 we compare `i` and `num_found` so let's ensure that they are both ints.
  • Loading branch information
cclauss authored Apr 10, 2022
1 parent 130f4a1 commit da334d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internetarchive/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def _scrape(self):
j = r.json()
if j.get('error'):
yield j
num_found = j['total']
num_found = int(j['total'])
self._handle_scrape_error(j)

self.params['cursor'] = j.get('cursor')
Expand Down

0 comments on commit da334d7

Please sign in to comment.