diff options
-rw-r--r-- | python/sandcrawler/ia.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/python/sandcrawler/ia.py b/python/sandcrawler/ia.py index 6468743..2940d89 100644 --- a/python/sandcrawler/ia.py +++ b/python/sandcrawler/ia.py @@ -348,7 +348,8 @@ class WaybackClient: # defensively check that this is actually correct replay based on headers assert "X-Archive-Src" in resp.headers - assert datetime in resp.url + if not datetime in resp.url: + raise WaybackError("didn't get exact reply (redirect?) datetime:{} got:{}".format(datetime, resp.url)) if cdx_sha1hex: # verify that body matches CDX hash |