Skip to content

新增 bioRxiv/medRxiv 搜索适配器 #316

@jerry609

Description

@jerry609

动机

bioRxiv/medRxiv 是生物学和医学领域最大的预印本服务器。覆盖尚未正式发表但影响力大的研究。

API 信息

  • URL: https://api.biorxiv.org/details/{server}/{start_date}/{end_date}/{cursor}
  • server: biorxivmedrxiv
  • 认证: 免费, 无需 API key
  • 限流: 无官方限制
  • 返回: title, doi, authors (分号分隔), abstract, date, category

特殊性

bioRxiv API 不支持关键词搜索, 只能按日期范围返回所有论文 → 必须客户端 keyword 过滤:

def _matches_query(paper, keywords):
    text = f"{paper['title']} {paper['abstract']}".lower()
    return any(kw.lower() in text for kw in keywords)

因此更适合作为 daily digest / harvest pipeline 的数据源, 交互式搜索场景优先级较低。

涉及文件

文件 改动
infrastructure/harvesters/biorxiv_harvester.py 新建 — BioRxivHarvester
infrastructure/adapters/biorxiv_adapter.py 新建 — BioRxivAdapter(SearchPort)
infrastructure/adapters/__init__.py 注册 biorxiv adapter
tests/unit/test_biorxiv_adapter.py 新建

验收标准

  • BioRxivAdapter 实现 SearchPort protocol
  • 默认搜索最近 30 天的论文并过滤
  • mock 测试通过

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestsearchSearch infrastructure

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions