Download paper PDFs from Libgen using a DOI
Project description
doi-fetcher
A minimal Python package and CLI to download paper PDFs from Libgen using a DOI.
Install
pip install doi-fetcher
CLI
# Download to the current directory (filename derived from DOI)
doi-fetcher 10.1006/viro.1998.9547
# Set output directory and filename
doi-fetcher 10.1006/viro.1998.9547 --output-dir ./papers --filename viro-1998.pdf
# Provide a full output path
doi-fetcher 10.1006/viro.1998.9547 -o /tmp/viro.pdf
# Use a specific mirror
doi-fetcher 10.1006/viro.1998.9547 --mirror li
Options:
-o, --outputFull output path. Overrides--output-dirand--filename.--output-dirDirectory to save the PDF (default: current directory).--filenameFilename to use (default: derived from DOI).--mirrorLibgen mirror suffix (e.g.li) or full URL.--fallback-mirrorAdditional mirror suffix or URL to try if the primary fails. Can be used multiple times.--no-fallbackDisable fallback mirrors.--timeoutRequest timeout in seconds (default: 60).
Python usage
from doi_fetcher import fetch_pdf_by_doi, DoiFetcher
# Simple helper
path = fetch_pdf_by_doi("10.1006/viro.1998.9547", output_dir="papers")
# Reusable fetcher
fetcher = DoiFetcher(mirror="li")
path = fetcher.fetch("10.1006/viro.1998.9547", output_path="paper.pdf")
Notes:
- The DOI can also be provided as a DOI URL (e.g.
https://doi.org/...). - If multiple results exist, the first PDF result is downloaded.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file doi_fetcher-0.1.3.tar.gz.
File metadata
- Download URL: doi_fetcher-0.1.3.tar.gz
- Upload date:
- Size: 6.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8015ac386eff9b8ba2a5390a8440a1203f6e067a183938fb1373693d44305973
|
|
| MD5 |
58e38300bf2fd022d416cf56a29df897
|
|
| BLAKE2b-256 |
a0c345add0560ad1ac8e3cef48bac281f85a9385ccfadffced9ceca3e6e7adb9
|
Provenance
The following attestation bundles were made for doi_fetcher-0.1.3.tar.gz:
Publisher:
publish.yml on nicoaira/doi-fetcher
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
doi_fetcher-0.1.3.tar.gz -
Subject digest:
8015ac386eff9b8ba2a5390a8440a1203f6e067a183938fb1373693d44305973 - Sigstore transparency entry: 863127389
- Sigstore integration time:
-
Permalink:
nicoaira/doi-fetcher@79bab71a22372e92f9ba9d9a6dff78bdb160b32c -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/nicoaira
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@79bab71a22372e92f9ba9d9a6dff78bdb160b32c -
Trigger Event:
release
-
Statement type:
File details
Details for the file doi_fetcher-0.1.3-py3-none-any.whl.
File metadata
- Download URL: doi_fetcher-0.1.3-py3-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4b8df22822f964b5b6b92213376619ace87292257091abeb670a50a8204c5597
|
|
| MD5 |
8bb95797495f0e73ee7e840a68feaea2
|
|
| BLAKE2b-256 |
288acac759dcc0ec76f72ee59c0de89da8fb441789322ce497a6715db37e6916
|
Provenance
The following attestation bundles were made for doi_fetcher-0.1.3-py3-none-any.whl:
Publisher:
publish.yml on nicoaira/doi-fetcher
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
doi_fetcher-0.1.3-py3-none-any.whl -
Subject digest:
4b8df22822f964b5b6b92213376619ace87292257091abeb670a50a8204c5597 - Sigstore transparency entry: 863127393
- Sigstore integration time:
-
Permalink:
nicoaira/doi-fetcher@79bab71a22372e92f9ba9d9a6dff78bdb160b32c -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/nicoaira
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@79bab71a22372e92f9ba9d9a6dff78bdb160b32c -
Trigger Event:
release
-
Statement type: