Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pubmed fetcher

Download open access PDFs from PubMed Central — no scraping, no captcha, no API key.

How it works

  1. Sci-Hub (Primary): Tries to query sci-hub.fr first for faster downloads directly via the provided PMCID.
  2. NCBI OA FTP (Secondary): Queries the NCBI OA API with the given PMCID and downloads directly from ftp.ncbi.nlm.nih.gov.
  3. Wayback + Europe PMC (Tertiary): Falls back to retrieving the filename via Wayback Machine and downloading it from the Europe PMC API as a last resort.

Requirements

Usage

Single File Download

uv run main.py <PMCID>

Example:

uv run main.py PMC7265004

Batch Download

You can use the batch.py script to asynchronously download multiple PMCID formats either from a .txt file (one PMCID per line) or a JSONL file containing "PMCID": "..." objects.

uv run batch.py <file.jsonl|file.txt>

Example (input.jsonl):

uv run batch.py input.jsonl

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages