Skip to content

Commit

Permalink
Catch more body size errors, closes #90
Browse files Browse the repository at this point in the history
  • Loading branch information
simonw committed Sep 15, 2022
1 parent c674e9e commit 42be8f8
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions shot_scraper/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -729,11 +729,8 @@ def on_response(response):
try:
body = response.body()
size = len(body)
except Error as ex:
if "Network.getResponseBody" in ex.message:
size = None
else:
raise
except Error:
size = None
log_requests.write(
json.dumps(
{
Expand Down

0 comments on commit 42be8f8

Please sign in to comment.