Unofficial API for retrieving documents from SciHub
Project description
Sci-Hub lib
Forked from Scihub Downloader which is a fork of scihub.py.
Usage
First, import the module and create an instance of the SciHub
object. At this point, you can optionally specify which Sci-Hub mirror will be employed.
from scihub import SciHub
sh = SciHub(base_url="https://sci-hub.ru")
The fetch
method will obtain a URL for direct downloading of an specified reference:
sh.fetch("https://doi.org/10.1111/gwmr.12285")
> 'http://dacemirror.sci-hub.ru/journal-article/0b1ec328b87368b809e0913c8591b9bc/miller2018.pdf?download=true'
The download
method will automatically download the PDF from the reference into a specified location:
sh.download(
reference="https://doi.org/10.1111/gwmr.12285",
output_dir="./",
pdf_filename = "paper.pdf" # This is optional
)
CLI tool
The package features a tool to download PDF files from the command line.
scihub "https://doi.org/10.1111/gwmr.12285"
It can be called with the arguments --output
/-o
to specify where to save the PDF file, and with --sci-hub-url
to specify the Sci-Hub mirror.
scihub "https://doi.org/10.1111/gwmr.12285" -o here.pdf --sci-hub-url "https://sci-hub.ru"
License
MIT
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
Hashes for scihub_dmunozg-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 53b6313c66e2c7c4ee7b849d41f970306d99541535e2ee208c7030af70557c7d |
|
MD5 | 30af6dcc4eb748359e211d4d439acf3c |
|
BLAKE2b-256 | 2687fbfea413afe030b21359507fee14ebf1710e590d594d729187cfa34d4b1c |