hathitrust-downloader


Namehathitrust-downloader JSON
Version 1.1.4 PyPI version JSON
download
home_pagehttp://github.com/addono/hathitrust-downloader
SummaryDownloads multiple pages from Hathitrust from the CLI.
upload_time2023-06-03 11:08:08
maintainer
docs_urlNone
authorAdriaan Knapen
requires_python
licenseMIT
keywords hathitrust download downloader cli
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # HathiTrust Downloader
[![PyPI](https://img.shields.io/pypi/v/hathitrust-downloader?style=flat-square&logo=pypi)][pypi]
[![PyPI - Downloads](https://img.shields.io/pypi/dm/hathitrust-downloader?logo=pypi&style=flat-square)][pypi]
[![GitHub version](https://img.shields.io/github/release/Addono/HathiTrust-downloader.svg?style=flat-square&logo=github)][github-releases]
[![GitHub download](https://img.shields.io/github/downloads/Addono/HathiTrust-downloader/total.svg?style=flat-square&logo=github)][github-releases]
[![GitHub stars](https://img.shields.io/github/stars/Addono/HathiTrust-downloader?style=flat-square)](https://github.com/Addono/HathiTrust-downloader/stargazers)
[![License](https://img.shields.io/github/license/Addono/HathiTrust-downloader.svg?style=flat-square)](LICENSE)

## Installing

### Python 3 (OS Agnostic)

Check that you have Python 3 installed and available on your shell. The following command should return something like `Python 3.8.5`.

```bash
python -V
```

> Windows users: Make sure to enable the "Add to PATH" option when installing Python.

Now you can install using `pip` with the following command.

```bash
pip install hathitrust-downloader
```

Which allows you to interact with the downloader from the command line:

```bash
hathitrust-downloader --help
```

### Windows Executable

There are also Windows executables available. Download the `downloader.zip` from [releases](https://github.com/Addono/HathiTrust-downloader/releases/) and extract it. Then open a shell, e.g. `cmd` or `powershell`, to the directory where the ZIP is extracted. The easiest way to do this is by opening the folder in Explorer and right click while holding shift, now select the option "Open PowerShell Window Here".

The executable is bundled with Python and all other dependencies, hence you do not need to have anything installed. Now the tool can be used like:

```powershell
.\downloader.exe --help 
```

## Usage

The help should give some instructions on how to use the tool:

```bash
usage: hathitrust-downloader [-h] [--name NAME] id start_page end_page

Book downloader from Hathitrust

positional arguments:
  id           The ID of the book, e.g 'mdp.39015027794331'.
  start_page   The page number of the first page to be downloaded.
  end_page     The last number of the last page to be downloaded (inclusive).

optional arguments:
  -h, --help   show this help message and exit
  --name NAME  The start of the filename. Defaults to using the id. This can
```

One example which downloads page 1 until (and including) 10 of the book with id `mdp.39015027794331` and naming the files `my-book_page_<page_number>.pdf`:

```bash
hathitrust-downloader mdp.39015027794331 1 10 --name my-book
```

The ID of the file can be found as part of the URL when opening a book through your browser.

## Troubleshooting

### No Progess / Progress Bar is Stuck

Make sure that you can access books on HathiTrust. Try to open a book in your browser to see if everything is working fine. HathiTrust can require you to connect from an American IP. In addition, they limit the amount of pages you can download to 15 every 5 minutes. When you hit that limit you will need to wait, the tool will automatically wait and resume when the timeout is finished.

[pypi]: https://pypi.org/project/hathitrust-downloader/
[github-releases]: https://github.com/Addono/HathiTrust-downloader/releases/latest



            

Raw data

            {
    "_id": null,
    "home_page": "http://github.com/addono/hathitrust-downloader",
    "name": "hathitrust-downloader",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "hathitrust download downloader cli",
    "author": "Adriaan Knapen",
    "author_email": "hi@aknapen.nl",
    "download_url": "https://files.pythonhosted.org/packages/49/1e/09f3b8f4049d1cbc6484309d9b9e3b607ecf99bae6149dda73d4586849a0/hathitrust-downloader-1.1.4.tar.gz",
    "platform": null,
    "description": "# HathiTrust Downloader\n[![PyPI](https://img.shields.io/pypi/v/hathitrust-downloader?style=flat-square&logo=pypi)][pypi]\n[![PyPI - Downloads](https://img.shields.io/pypi/dm/hathitrust-downloader?logo=pypi&style=flat-square)][pypi]\n[![GitHub version](https://img.shields.io/github/release/Addono/HathiTrust-downloader.svg?style=flat-square&logo=github)][github-releases]\n[![GitHub download](https://img.shields.io/github/downloads/Addono/HathiTrust-downloader/total.svg?style=flat-square&logo=github)][github-releases]\n[![GitHub stars](https://img.shields.io/github/stars/Addono/HathiTrust-downloader?style=flat-square)](https://github.com/Addono/HathiTrust-downloader/stargazers)\n[![License](https://img.shields.io/github/license/Addono/HathiTrust-downloader.svg?style=flat-square)](LICENSE)\n\n## Installing\n\n### Python 3 (OS Agnostic)\n\nCheck that you have Python 3 installed and available on your shell. The following command should return something like `Python 3.8.5`.\n\n```bash\npython -V\n```\n\n> Windows users: Make sure to enable the \"Add to PATH\" option when installing Python.\n\nNow you can install using `pip` with the following command.\n\n```bash\npip install hathitrust-downloader\n```\n\nWhich allows you to interact with the downloader from the command line:\n\n```bash\nhathitrust-downloader --help\n```\n\n### Windows Executable\n\nThere are also Windows executables available. Download the `downloader.zip` from [releases](https://github.com/Addono/HathiTrust-downloader/releases/) and extract it. Then open a shell, e.g. `cmd` or `powershell`, to the directory where the ZIP is extracted. The easiest way to do this is by opening the folder in Explorer and right click while holding shift, now select the option \"Open PowerShell Window Here\".\n\nThe executable is bundled with Python and all other dependencies, hence you do not need to have anything installed. Now the tool can be used like:\n\n```powershell\n.\\downloader.exe --help \n```\n\n## Usage\n\nThe help should give some instructions on how to use the tool:\n\n```bash\nusage: hathitrust-downloader [-h] [--name NAME] id start_page end_page\n\nBook downloader from Hathitrust\n\npositional arguments:\n  id           The ID of the book, e.g 'mdp.39015027794331'.\n  start_page   The page number of the first page to be downloaded.\n  end_page     The last number of the last page to be downloaded (inclusive).\n\noptional arguments:\n  -h, --help   show this help message and exit\n  --name NAME  The start of the filename. Defaults to using the id. This can\n```\n\nOne example which downloads page 1 until (and including) 10 of the book with id `mdp.39015027794331` and naming the files `my-book_page_<page_number>.pdf`:\n\n```bash\nhathitrust-downloader mdp.39015027794331 1 10 --name my-book\n```\n\nThe ID of the file can be found as part of the URL when opening a book through your browser.\n\n## Troubleshooting\n\n### No Progess / Progress Bar is Stuck\n\nMake sure that you can access books on HathiTrust. Try to open a book in your browser to see if everything is working fine. HathiTrust can require you to connect from an American IP. In addition, they limit the amount of pages you can download to 15 every 5 minutes. When you hit that limit you will need to wait, the tool will automatically wait and resume when the timeout is finished.\n\n[pypi]: https://pypi.org/project/hathitrust-downloader/\n[github-releases]: https://github.com/Addono/HathiTrust-downloader/releases/latest\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Downloads multiple pages from Hathitrust from the CLI.",
    "version": "1.1.4",
    "project_urls": {
        "Homepage": "http://github.com/addono/hathitrust-downloader"
    },
    "split_keywords": [
        "hathitrust",
        "download",
        "downloader",
        "cli"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7dbe414e690954ad1c591f3a2a06eb8a30f53700e32c0a02af46a2bca613f45d",
                "md5": "83632c4d912adcd269343b7a276acf4e",
                "sha256": "32c8243e34beb54fe318fb8bb7fdc193ea7a0879da569eff2a7858c17334cd6c"
            },
            "downloads": -1,
            "filename": "hathitrust_downloader-1.1.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "83632c4d912adcd269343b7a276acf4e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 4967,
            "upload_time": "2023-06-03T11:08:07",
            "upload_time_iso_8601": "2023-06-03T11:08:07.504654Z",
            "url": "https://files.pythonhosted.org/packages/7d/be/414e690954ad1c591f3a2a06eb8a30f53700e32c0a02af46a2bca613f45d/hathitrust_downloader-1.1.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "491e09f3b8f4049d1cbc6484309d9b9e3b607ecf99bae6149dda73d4586849a0",
                "md5": "6994ddb069f223ed14f0ae8afeb9eb5e",
                "sha256": "dca8bc4f4bc1d0e191938af4ca57c067214e3de78dd0361e8f54b4a231ff929e"
            },
            "downloads": -1,
            "filename": "hathitrust-downloader-1.1.4.tar.gz",
            "has_sig": false,
            "md5_digest": "6994ddb069f223ed14f0ae8afeb9eb5e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 4502,
            "upload_time": "2023-06-03T11:08:08",
            "upload_time_iso_8601": "2023-06-03T11:08:08.930902Z",
            "url": "https://files.pythonhosted.org/packages/49/1e/09f3b8f4049d1cbc6484309d9b9e3b607ecf99bae6149dda73d4586849a0/hathitrust-downloader-1.1.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-06-03 11:08:08",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "addono",
    "github_project": "hathitrust-downloader",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "hathitrust-downloader"
}
        
Elapsed time: 0.07987s