From 246f8033ba189bdf3ddbf64b2cb851d86ec43b75 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Wed, 15 Jan 2020 23:20:37 -0800 Subject: handle UnicodeDecodeError in the other GET instance --- python/sandcrawler/ia.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'python') diff --git a/python/sandcrawler/ia.py b/python/sandcrawler/ia.py index 9fdb52e..02258df 100644 --- a/python/sandcrawler/ia.py +++ b/python/sandcrawler/ia.py @@ -448,6 +448,8 @@ class WaybackClient: ) except requests.exceptions.TooManyRedirects: raise WaybackError("redirect loop (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