feat: 优化get_paper_meta_from_openalex2

This commit is contained in:
caoqianming 2026-01-23 13:54:28 +08:00
parent ad2c49c488
commit 0018597006
1 changed files with 3 additions and 2 deletions

View File

@ -23,13 +23,14 @@ def get_paper_meta_from_openalex(publication_year:int, search_key:str):
type="article" # 将 type 移到 filter 中
).search(search_key).select([
"id", "doi", "title", "publication_date",
"open_access", "authorships", "primary_location", "publication_year"
"open_access", "authorships", "primary_location", "publication_year",
"display_name"
]).paginate(per_page=200, n_max=None, cursor=cache_cursor)
next_cursor = pager._next_value
for page in pager:
papers = []
for record in page:
if record["doi"]:
if record["doi"] and (record["display_name"] or record["title"]):
paper = Paper()
paper.id = idWorker.get_id()
paper.type = "article"