diff options
author | Bryan Newbold <bnewbold@archive.org> | 2019-11-14 11:05:13 -0800 |
---|---|---|
committer | Bryan Newbold <bnewbold@archive.org> | 2019-11-14 11:05:13 -0800 |
commit | 088593a424299d8f9797142fb77995596bb49a5a (patch) | |
tree | 1a051652cab8d35ef023529a13284f45cf4cff8a /python | |
parent | 7d754db1b5809d0cb4c18c4432b4347914757196 (diff) | |
download | sandcrawler-088593a424299d8f9797142fb77995596bb49a5a.tar.gz sandcrawler-088593a424299d8f9797142fb77995596bb49a5a.zip |
handle SPNv1 redirect loop
Diffstat (limited to 'python')
-rw-r--r-- | python/sandcrawler/ia.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/python/sandcrawler/ia.py b/python/sandcrawler/ia.py index 08b92e2..e945474 100644 --- a/python/sandcrawler/ia.py +++ b/python/sandcrawler/ia.py @@ -173,6 +173,8 @@ class SavePageNowClient: except requests.exceptions.RetryError as re: # could have been any number of issues... raise SavePageNowError(str(re)) + except requests.exceptions.TooManyRedirects as tmr: + raise SavePageNowRemoteError(str(tmr)) if resp.status_code != 200 and resp.headers.get('X-Archive-Wayback-Runtime-Error'): # looks like a weird remote error; would not expect a CDX reply so bailing here |