aboutsummaryrefslogtreecommitdiffstats
path: root/python/sandcrawler
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2022-01-11 14:49:37 -0800
committerBryan Newbold <bnewbold@archive.org>2022-01-11 14:49:37 -0800
commitff6894043576d3d51c9ab16623053f91780edc89 (patch)
tree983ed2f5a61c05c088df96416017ef13cf439dda /python/sandcrawler
parent4e8407758618bece136addffe301ba8357366de3 (diff)
downloadsandcrawler-ff6894043576d3d51c9ab16623053f91780edc89.tar.gz
sandcrawler-ff6894043576d3d51c9ab16623053f91780edc89.zip
spn: handle blocked-url (etc) better
Diffstat (limited to 'python/sandcrawler')
-rw-r--r--python/sandcrawler/ia.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/python/sandcrawler/ia.py b/python/sandcrawler/ia.py
index dc9aae5..d123c9f 100644
--- a/python/sandcrawler/ia.py
+++ b/python/sandcrawler/ia.py
@@ -1040,6 +1040,16 @@ class SavePageNowClient:
and "You have already reached the limit of active sessions" in resp_json["message"]
):
raise SavePageNowBackoffError(resp_json["message"])
+ elif resp_json.get("status") == "error":
+ return SavePageNowResult(
+ False,
+ resp_json.get("status_ext") or resp_json["status"],
+ None,
+ request_url,
+ None,
+ None,
+ None,
+ )
elif not resp_json or "job_id" not in resp_json or not resp_json["job_id"]:
raise SavePageNowError(
"Didn't get expected 'job_id' field in SPN2 response: {}".format(resp_json)