Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: way to download bundle in one fell swoop #14

Open
bradgy opened this issue May 18, 2016 · 12 comments
Open

Feature request: way to download bundle in one fell swoop #14

bradgy opened this issue May 18, 2016 · 12 comments

Comments

@bradgy
Copy link

bradgy commented May 18, 2016

as well as an individual file download option, it'd be handy to be able to pull down all files of a given type in an entire bundle. I'm thinking specifically for my use case of ebooks/comics, which might have up to 50 or so files in a bundle, where I could just go and get every cbz, epub, or pdf at once.
Is this feasible? Would HB frown on having their API hit like this? I have very little python experience but happy to help make this happen. Cheers.

@parkerlreed
Copy link

Also a way to just download EVERYTHING would be great. I'd like to archive all available games (possibly sorted by bundle), in every available format.

@MestreLion
Copy link
Owner

Those are great suggestions, thanks!

While all of this is surely feasible, I believe such features belong to a shell script. The console script already has a huge list of options, and this is trivial to do in a bash script using the existing command line options. I'd like to avoid cluttering the options even further for features that could be chained from the basic ones, like a for loop on the games list (or per bundle) that downloads each game using --platform or --type as a filter.

However, I'd be more than happy to include such script in the repo, if anyone is willing to code it. I'd also appreciate suggestions for command line option names and letters for this "batch mode", if we ever merge this in main script.

@jherazob
Copy link

jherazob commented Oct 5, 2016

Agreed, this sounds more like a job for a shell script. Something like this to download every audio thing (untested, don't just use it like this):

for audiothing in $(humblebundle.py -l -p audio) ; do 
  humblebundle.py -f /some/directory/with/lots/of/space -d $audiothing
done

At least that's how i'd do it

@emorrp1
Copy link

emorrp1 commented Nov 7, 2016

I agree it can be done with the existing api, but integrating the feature allows for e.g. resuming download in a directory that already contains most of your humble library, checking for updates, specifying a subdirectory naming scheme e.g. based on platform or language. If you do end up implementing this feature, I would recommend looking at lgogdownloader for ideas and its manpage for naming options.

@jmtd
Copy link
Contributor

jmtd commented Nov 8, 2016

I'm looking at using this to download a torrent of anything I've bought that offers a torrent, in all possible formats; it's certainly possible with scripts (first step: -l to get a list of all products) but it's not trivial because you don't know until you inspect each product what platforms, architectures, etc. are available, so you'd need to also do a show (probably with JSON output), then interpret the JSON to get the download flags right, etc.... which is starting to get "interesting" to do in shell.

@MestreLion
Copy link
Owner

@jmtd "interesting" in shell script, but still trivial in a python script, importing this package as a library.

I'm not saying I'm opposing such feature, I just really don't have the time to code it, so I'm thinking about alternate solutions... still, Pull Requests are welcome :)

@jmtd
Copy link
Contributor

jmtd commented Nov 21, 2016

@jmtd "interesting" in shell script, but still trivial in a python script, importing this package as a library.

Sure, thanks; I hadn't thought of importing this package as a library, that would make it much easier

I'm not saying I'm opposing such feature, I just really don't have the time to code it, so I'm thinking about alternate solutions... still, Pull Requests are welcome :)

Great! I actually started a (shell) script to do this, and intended to stuff it into a contrib/ directory (or similar) in a fork and raise a PR. I might re-start as Python, though, as I've already hit pain points in shell, and I only spent around 30 minutes on it.

@emorrp1
Copy link

emorrp1 commented Nov 21, 2016

@jmtd see also the Usage as a library example for a head start.

@chtk
Copy link
Contributor

chtk commented Dec 29, 2016

I've been working on a script written in bash, which uses jq to query the json output of humblebundle.py. It can

  • Download the whole library
  • Filter by bundle, game, and platform via commandline arguments
  • Filter by jq queries in a configuration file.
  • hardlink existing files already downloaded for other bundles by using find.

Right now it uses a hardcoded path to store downloads (bundle/platform). I'm planning on adding configurable storage paths, but haven't gotten around to that yet.

The script is pretty slow. Mainly because of the many calls to jq. But it might be interesting to someone implementing a proper script.

@Two-Tone
Copy link

For mass downloading, there is hb-downloader, which is written in Python 2.7 and has a MIT license, but has not had any commits in over a year and does not work as a result. Maybe that could be used as a basis?

@MayeulC
Copy link

MayeulC commented Apr 18, 2018

@Two-Tone I forked this a while ago there, and fixed it: https://github.com/MayeulC/hb-downloader and was presently going trough a round of improvements (not pushed yet). I just discovered this tool, and I have been wondering what could be done to merge both, or even if it would be useful to do so. I guess I'll open an issue here... (done: #47)

@parkerlreed
Copy link

@MayeulC Sweet! Gave it a try but after authy it errors out asking if I'm a robot :)

If that's in the current set of changes, then woohoo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants