Skip to content
Snippets Groups Projects

Retry image download

Merged Yoann Schneider requested to merge retry-image-download into main
All threads resolved!
1 file
+ 1
1
Compare changes
  • Side-by-side
  • Inline
@@ -57,7 +57,7 @@ def download_image(url):
try:
resp = _retried_request(url)
except requests.HTTPError as e:
if 400 <= e.response.status_code < 500:
if "/full/" in url and 400 <= e.response.status_code < 500:
# Retry with max instead of full as IIIF size
resp = _retried_request(url.replace("/full/", "/max/"))
else:
Loading