feat: save_pdf_from_openalex 保存openalex_pdf_not_found

This commit is contained in:
caoqianming 2026-02-10 14:06:33 +08:00
parent 2690895231
commit 3c568c076b
1 changed files with 3 additions and 0 deletions

View File

@ -459,6 +459,9 @@ def save_pdf_from_openalex(paper:Paper):
if "Insufficient credits" in res.json().get("message", ""):
cache.set("openalex_api_exceed", True, timeout=3600)
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):