2020-01-19 15:25:00 +01:00
# Humble Bundle Downloader
2020-01-19 15:29:21 +01:00
2024-08-01 01:59:58 +02:00
[![PyPI ](https://img.shields.io/pypi/v/humblebundle-downloader.svg )](https://pypi.python.org/pypi/humblebundle-downloader)
[![PyPI ](https://img.shields.io/pypi/l/humblebundle-downloader.svg )](https://pypi.python.org/pypi/humblebundle-downloader)
2020-01-19 15:29:21 +01:00
2020-01-20 00:39:28 +01:00
**Download all of your content from your Humble Bundle Library!**
2020-01-19 15:25:00 +01:00
2024-08-01 01:59:58 +02:00
The first time this runs it may take a while because it will download everything.
After that it will only download the content that has been updated or is missing.
2020-01-19 15:25:00 +01:00
## Features
2024-08-01 01:59:58 +02:00
2020-01-26 16:19:08 +01:00
- support for Humble Trove _(`--trove` flag)_
- downloads new and updated content from your Humble Bundle Library on each run _(only check for updates if using `--update`)_
2020-01-20 00:39:28 +01:00
- cli command for easy use (downloading will also work on a headless system)
2020-01-20 05:11:35 +01:00
- works for SSO and 2FA accounts
- optional progress bar for each item downloaded _(`--progress` flag)_
- optional filter by file types using an include _or_ exclude list _(`--include/--exclude` flag)_
- optional filter by platform types like video, ebook, etc... _(`--platform` flag)_
2020-01-19 15:25:00 +01:00
2020-01-19 15:28:29 +01:00
2020-01-19 15:25:00 +01:00
## Install
2024-08-01 01:59:58 +02:00
2024-08-04 22:49:41 +02:00
### Using PIP
2020-01-19 15:25:00 +01:00
`pip install humblebundle-downloader`
2024-08-04 22:49:41 +02:00
### Using docker
Remember to mount your download directory in the container using dockers `-v` argument.
`docker run ghcr.io/xtream1101/humblebundle-downloader -h`
2020-01-20 00:39:28 +01:00
## Instructions
2020-01-19 15:25:00 +01:00
2024-08-01 01:59:58 +02:00
2020-01-20 00:39:28 +01:00
### 1. Getting cookies
2024-08-01 01:59:58 +02:00
First thing to do is get your account cookies.
This can be done by getting a browser extension that lets you see or export your cookies.
2021-02-14 15:51:40 +01:00
- **Method 1 (recommended)**
2022-02-08 22:20:42 +01:00
- Get the value of the cookie called `_simpleauth_sess` and pass that value using `-s 'COOKIE_VALUE'`
2024-08-04 22:36:26 +02:00
- Note: The quotes in the cookie value are part of the value, you might need to wrap the entire value
(including double quotes) in single quotes. Some suggestions for common issues can be found in [issue #50 ](https://github.com/xtream1101/humblebundle-downloader/issues/50 )
2021-02-14 15:51:40 +01:00
- **Method 2**
- Export the cookies in the Netscape format using an extension.
2024-08-01 01:59:58 +02:00
If your exported cookie file is not working, it may be a formatting issue.
This can be fixed by running the command `curl -b cookies.orig.txt --cookie-jar cookies.txt http://bogus`
2021-02-14 15:51:40 +01:00
2020-01-20 00:39:28 +01:00
### 2. Downloading your library
2024-08-01 01:59:58 +02:00
2020-01-20 00:39:28 +01:00
Use the following command to download your Humble Bundle Library:
2021-05-21 15:17:47 +02:00
`hbd --cookie-file cookies.txt --library-path "Downloaded Library" --progress`
2024-08-04 22:49:41 +02:00
_If using the docker image, exclude the `hbd` part of the command_
2020-01-20 00:39:28 +01:00
This directory structure will be used:
2020-01-20 16:26:48 +01:00
`Downloaded Library/Purchase Name/Item Name/downloaded_file.ext`
2020-01-20 00:39:28 +01:00
## Notes
2024-08-01 01:59:58 +02:00
- Inside your library folder a file named `.cache.json` is saved and keeps track of the files that have been downloaded.
This way running the download command again pointing to the same directory will only download new or updated files.
- Use `--help` with all `hbd` commands to see available options
- Find supported platforms for the `--platform` flag by visiting your Humble Bundle Library
and look under the **Platform** dropdown
- Download select bundles by using the `-k` or `--keys` flag.
Find these keys by going to your _Purchases_ section,
click on a products and there should be a `downloads?key=XXXX` in the url.