feat: save_pdf_from_openalex 保存openalex_pdf_not_found
This commit is contained in:
parent
2690895231
commit
3c568c076b
|
|
@ -459,6 +459,9 @@ def save_pdf_from_openalex(paper:Paper):
|
||||||
if "Insufficient credits" in res.json().get("message", ""):
|
if "Insufficient credits" in res.json().get("message", ""):
|
||||||
cache.set("openalex_api_exceed", True, timeout=3600)
|
cache.set("openalex_api_exceed", True, timeout=3600)
|
||||||
return "openalex_pdf_error: Insufficient credits"
|
return "openalex_pdf_error: Insufficient credits"
|
||||||
|
elif res.status_code == 404:
|
||||||
|
paper.save_fail_reason("openalex_pdf_not_found")
|
||||||
|
return "openalex_pdf_error: 404"
|
||||||
|
|
||||||
|
|
||||||
def save_pdf_from_elsevier(paper:Paper):
|
def save_pdf_from_elsevier(paper:Paper):
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue