Skip to content

Commit

Permalink
Fix: error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
eight04 committed Dec 23, 2024
1 parent 71b6478 commit ef9ef9b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion comiccrawler/grabber.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,13 @@ def do_request(s, url, proxies, retry, **kwargs):
if r.status_code in SUCCESS_CODES:
break
if not retry or r.status_code not in RETRYABLE_HTTP_CODES:
r.raise_for_status()
try:
# FIXME: https://github.com/lexiforest/curl_cffi/issues/467
r.raise_for_status()
except HTTPError as err:
if not err.response:
err.response = r
raise err
# 302 error without location header
if r.status_code == 302:
# pylint: disable=protected-access
Expand Down

0 comments on commit ef9ef9b

Please sign in to comment.