Coder Social home page Coder Social logo

grnassar / humble-trove-downloader Goto Github PK

View Code? Open in Web Editor NEW

This project forked from slashbunny/humble-vault-downloader

0.0 0.0 1.0 35 KB

Downloads games from Humble Trove

License: GNU General Public License v3.0

PHP 97.36% Dockerfile 2.64%

humble-trove-downloader's Introduction

Humble Vault (Trove) Downloader

Quick and dirty script to download all games, for all operating systems, from Humble Vault (formerly known as Humble Trove). This does not download all games from the Humble App- It only downloads the "Vault" games. You need a Humble Choice subscription to download these games.

Forked from Slashbunny's excellent initial work; looking at the more "popular" Humble Trove downloaders made me think I'd have to write mine from scratch, until I found this clean but full-featured one. (Honorable mention goes to the one by darktohka -- initially I felt that was a bit too OO for this task, but the more I looked at it the more it grew on me.) Not that more than ten people will end up seeing this anyway, but credit where credit's due. I thought about making a PR for my changes, but they got to be rather expansive and I didn't have the good forethought to fork off features as I made them. Most of the README below also comes from upstream, so while I'll eventually try to update the below as I go, the code is the final authority.

Existing files have their md5 checksums checked versus what the Humble Bundle API reports. If there is a mismatch, you'll be prompted to skip or overwrite the file in question. For unattended options, check the available option flags (-h for help).

Setup

Pre-requisites

Install PHP and Composer. If you are using Linux, these should be available from your distribution's package repositories.

Install Dependencies

After cloning this repository, run composer in the project's main directory to install dependencies:

$ composer install

Usage

API Key

See the instructions here on how to get a session key from your browser while logged into the Humble Bundle website. This script will not work without it.

Running the Script

$ ./src/download.php DOWNLOAD_PATH HUMBLE_API_KEY

Example (this is not a real key):

$ ./src/download.php /home/downloads/humble "eyJ1GzZJE0oqwEaunyOYX3yrlkFUxPJq8PFWCgkKOHM00\075|1566665561|JR7m2nO769sO2Je4C2fE"

Excluding OS or Games

You can exclude operating systems with the -o parameter and games with the -g parameter. To exclude multiple, specify them in a comma-separated list as follows:

$ ./src/download.php -o mac,linux -g game1,game2,game3 /home/downloads/humble "eyJ1GzZJE0oqwEaunyOYX3yrlkFUxPJq8PFWCgkKOHM00\075|1566665561|JR7m2nO769sO2Je4C2fE"

-o can be "mac", "linux", and/or "windows". -g should be the "machine name" of the games, which are output in square brackets when downloading:

Processing The Flame in the Flood [theflameintheflood_vault]...

In the above example, you should use theflameintheflood_vault when using the -g parameter.

Docker

Slashbunny's docker image is available so you don't need to setup PHP or deal with dependencies:

$ docker run -it \
    -v /your/path/to/downloads/folder/:/downloads \
    -u $(id -u):$(id -g) \
    slashbunny/humble-vault-downloader:latest /downloads "eyJ1GzZJE0oqwEaunyOYX3yrlkFUxPJq8PFWCgkKOHM00\075|1566665561|JR7m2nO769sO2Je4C2fE"

The above will create the Docker instance with the upstream source; you can then attach to your local copy of the container and overwrite that with the download.php from this repo.

Help

Error Message: "Trying to get property 'signed_url' of non-object"

Your API key is wrong. Double check is it correct and quote it the same way in the example under Usage.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.