batch_download_pdfs
"Download open-access PMC PDFs in batch from CSV (PMID+PMCID) or TXT (PMID) files. Skips existing files and retries failures once, then provides a completion report with success and error counts."
Instructions
批量下载 PMC PDF。自动跳过已存在的文件,失败自动重试 1 次。
Args:
input_file: 输入文件路径。CSV 需含 PMID+PMCID 两列;TXT 每行一个 PMID(会自动查询 PMCID)
output_dir: PDF 保存目录的绝对路径
mode: "csv" 或 "txt",默认 "csv"
num_workers: 并行下载线程数,默认 2
Returns:
汇总信息字符串,如 "完成: 成功 2400, 失败 36, 报告: <path>"
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | csv | |
| input_file | Yes | ||
| output_dir | Yes | ||
| num_workers | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |