feat: 暂时去除从save_pdf_from_openalex
This commit is contained in:
parent
f922685561
commit
196454648a
|
|
@ -317,12 +317,13 @@ def download_pdf(paper_id):
|
|||
# 将状态改为downloading
|
||||
paper.fetch_status = 'downloading'
|
||||
paper.save(update_fields=['fetch_status', 'update_time'])
|
||||
|
||||
current_from = "oa_url"
|
||||
msg = save_pdf_from_oa_url(paper)
|
||||
if paper.has_fulltext_pdf is False:
|
||||
current_from = "openalex"
|
||||
msg = save_pdf_from_openalex(paper)
|
||||
msg = "没有下载渠道"
|
||||
if paper.oa_url:
|
||||
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)
|
||||
return msg, current_from
|
||||
finally:
|
||||
if paper.fetch_status == "downloading":
|
||||
|
|
|
|||
Loading…
Reference in New Issue