humblebundle-ebook-downloader icon indicating copy to clipboard operation
humblebundle-ebook-downloader copied to clipboard

Handling of elements of type `download` is confusing (--type download does not work, --type pdf does but the extension is wrong)

Open lestephane opened this issue 4 years ago • 2 comments

Besides the usual formats (pdf, epub, mobi), there sometimes is another type like 'download'

image

But humblebundle-ebook-downloader does not let me specify that type

$ humblebundle-ebook-downloader --format download  ...
Invalid format selected.

Is there a way to support this. Ideally I'd like to specify --format "pdf,download"

lestephane avatar Dec 04 '19 16:12 lestephane

hum it seems to be downloading the item of type "download" automatically when I specify "pdf", so I guess this issue is a non-issue. Still, surprising.

lestephane avatar Dec 04 '19 16:12 lestephane

More info

When I specify --format 'pdf' the following line gets displayed (among the other pdfs).

...
Downloading Humble Book Bundle: Data Science by No Starch Press - Bayesian Statistics the Fun Way: Understanding Statistics and Probability with Star Wars, LEGO, and Rubber Ducks (PDF) (6.9 MB)... (12/15)
Downloading Humble Book Bundle: Data Science by No Starch Press - Python Flash Cards: Syntax, Concepts, and Examples (Download) (805.5 kB)... (13/15)
Downloading Humble Book Bundle: Data Science by No Starch Press - Statistics Done Wrong: The Woefully Complete Guide (PDF) (2.9 MB)... (14/15)
...

(notice that the (Download) element is there)

The download file item gets saves under the name:

Humble Book Bundle: Data Science by No Starch Press - Python Flash Cards: Syntax, Concepts, and Examples.pdf

(notice the .pdf extension)

The extension is incorrect, since the file is really actually a zip file (albeit one that contains pdf files...)

So when I use --format pdf in the download command-line, the download file items also get downloaded, but I need to remember to adjust them to the proper extension.

Maybe this quirk can be fixed somehow. I'll re-open and adjust the subject

lestephane avatar Dec 04 '19 17:12 lestephane