From 31f2545eb8af78cde9e4e4178489a8630aca0d09 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Thu, 5 Mar 2020 00:40:00 -0800 Subject: ia: catch wayback ChunkedEncodingError --- python/sandcrawler/ia.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'python') diff --git a/python/sandcrawler/ia.py b/python/sandcrawler/ia.py index 267ecdc..99e92be 100644 --- a/python/sandcrawler/ia.py +++ b/python/sandcrawler/ia.py @@ -467,8 +467,11 @@ class WaybackClient: ) except requests.exceptions.TooManyRedirects: raise WaybackError("redirect loop (wayback replay fetch)") + except requests.exceptions.ChunkedEncodingError: + raise WaybackError("ChunkedEncodingError (wayback replay fetch)") except UnicodeDecodeError: raise WaybackError("UnicodeDecodeError in replay request (can mean nasty redirect URL): {}".format(url)) + try: resp.raise_for_status() except Exception as e: -- cgit v1.2.3