feat: 启用save_pdf_from_openalex
This commit is contained in:
parent
352966946e
commit
76e8204680
|
|
@ -360,15 +360,15 @@ def download_pdf(paper_id):
|
|||
else:
|
||||
current_from = "oa_url"
|
||||
msg = save_pdf_from_oa_url(paper)
|
||||
# if paper.has_fulltext_pdf is False and cache.get("openalex_api_exceed") is None:
|
||||
# current_from = "openalex"
|
||||
# msg = save_pdf_from_openalex(paper)
|
||||
if paper.has_fulltext_pdf is False and paper.publication_year <= 2021:
|
||||
current_from = "scihub"
|
||||
msg = save_pdf_from_scihub(paper)
|
||||
return msg, current_from
|
||||
if paper.has_fulltext_pdf is False and cache.get("openalex_api_exceed") is None:
|
||||
current_from = "openalex"
|
||||
msg = save_pdf_from_openalex(paper)
|
||||
if paper.fail_reason is None and paper.has_fulltext_pdf is False:
|
||||
paper.save_fail_reason(msg)
|
||||
return msg, current_from
|
||||
finally:
|
||||
paper.fetch_end()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue