Skip to content

Commit

Permalink
Fix infinite loop in request helper
Browse files Browse the repository at this point in the history
  • Loading branch information
kashav committed Apr 20, 2016
1 parent 095f577 commit 26fe823
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions uoftscrapers/scrapers/utils/scraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ def get(url, params=None, cookies=None, headers=None, json=False, max_attempts=1
doc = r
else:
sleep(0.5)
attempts += 1
except (requests.exceptions.Timeout,
requests.exceptions.ConnectionError):
attempts += 1
Expand Down

0 comments on commit 26fe823

Please sign in to comment.