Skip to main content

Unofficial API for retrieving documents from SciHub

Project description

Sci-Hub lib Python

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scihub_dmunozg-0.2.0.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

scihub_dmunozg-0.2.0-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file scihub_dmunozg-0.2.0.tar.gz.

File metadata

  • Download URL: scihub_dmunozg-0.2.0.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.11.7 Linux/6.7.2-arch1-1

File hashes

Hashes for scihub_dmunozg-0.2.0.tar.gz
Algorithm Hash digest
SHA256 0e8b43f28edf3d5e73bbe020f5aeeae4f76f145aa71635432260a63750264828
MD5 49adfa94d23e34b23571a0a6e4adf526
BLAKE2b-256 3f150f9316052d5cae750730ef452cfb787572a1f6caa6c58e6ed8189ee8c3cb

See more details on using hashes here.

File details

Details for the file scihub_dmunozg-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: scihub_dmunozg-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 7.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.11.7 Linux/6.7.2-arch1-1

File hashes

Hashes for scihub_dmunozg-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 53b6313c66e2c7c4ee7b849d41f970306d99541535e2ee208c7030af70557c7d
MD5 30af6dcc4eb748359e211d4d439acf3c
BLAKE2b-256 2687fbfea413afe030b21359507fee14ebf1710e590d594d729187cfa34d4b1c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page