Skip to main content

getarticle Python PyPI pypi downloads

Description

getarticle is a package based on SciHub and Google Scholar that can download articles given DOI, website address or keywords.

Install

Using pip to install:

# for latest version (developer)
pip install git+https://github.com/HTian1997/getarticle.git

# for last release (stable)
pip install getarticle

Features & Usage

getarticle can be imported in Python or used as command line.

To use in command line:

usage: getarticle [-h] [-i INPUT] [-o OUTPUT] [-sd SETDOWNLOAD]

getarticle CLI

optional arguments:
  -h, --help            show this help message and exit
  -i INPUT, --input INPUT
                        article DOI or website
  -s SEARCH [SEARCH ...], --search SEARCH [SEARCH ...]
                        search keywords
  -o OUTPUT, --output OUTPUT
                        download direction
  -sd SETDIRECTION, --setdirection SETDIRECTION
                        set default download direction

Example:

getarticle -i 10.1126/science.abc7424 -o /Users/haotian/Desktop

Please change the download direction to your own. The download direction is the current direction in terminal by default. To change the default download direction, use -sd option.

Tip: If the DOI contains parentheses, add "" around the DOI.

Example:

getarticle -sd /Users/haotian/Downloads

# will download to /Users/haotian/Downloads folder
getarticle -i 10.1126/science.abc7424

getarticle can also download article of the current webpage (only supported for MacOS Safari).

Example:

# current Safari webpage: 
# https://www.nature.com/articles/s41467-020-16670-2

# download article of current webpage to default direction
getarticle

To use in Python:

  1. Initialization
from getarticle import GetArticle

ga = GetArticle()
  1. Download a single article given DOI or website address.
ga.input_article("10.1126/science.abc7424")
ga.download()

Notes:

  • Once downloaded, all stored articles will be cleared;
  • For download function, direction argument is the current direction by default;
  • Downloaded article is named as either "article title.pdf" if successfull or "year-month-day-hour-minute-second.pdf".
  1. Download multiple articles.
ga.input_article("https://www.nature.com/articles/s41594-020-0468-7#article-info")
ga.input_article("10.1038/s41893-020-0581-y")
ga.download()

Notes:

  • Repeatedly using article function can save multiple articles.
  • getarticle will not save & download duplicate articles;
  1. Download related articles given keywords. Keywords can be article names, research fields or author names.
ga.search("Deep Dive into Machine Learning Models for Protein Engineering")
ga.search("SARS, Computation", num_of_page=2)
ga.search("Roberta Croce")
ga.download()

Notes:

  • num_of_page is the number of page in Google Scholar, 1 by default.
  1. Show currently stored articles / delete article by index.
ga.cur_articles()

ga.remove_article()

License

MIT

Release files for getarticle 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for getarticle 0.1.0
File Size Uploaded
getarticle-0.1.0.tar.gz 5.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for getarticle 0.1.0
File Interpreter ABI Platform
getarticle-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 11.4 kB

Release files / getarticle-0.1.0.tar.gz

Download URL getarticle-0.1.0.tar.gz
Size 5.1 kB
Tags Source
SHA-256 checksum
How to use checksums
6722cb28e80359117a165a8e3955f531421d8692f30b3f97ee2961552488689c
BLAKE2b-256 checksum
How to use checksums
fc0fe922cc7bd43175d53f9c638e59eb1ae14669bd7f12adb2fa4b0c90eb3d67
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.6.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.7.9

Release files / getarticle-0.1.0-py3-none-any.whl

Download URL getarticle-0.1.0-py3-none-any.whl
Size 6.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
518c710f17807df1250d2d5ac7dd3010ad7fdd8bea9b76f95baf8ccf799dca50
BLAKE2b-256 checksum
How to use checksums
15b3d70c63234028eb9670345949cbe0f660964fa9317dd5009cea38614d704e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.6.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.7.9

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page