DMarby / humblebundle-ebook-downloader

An easy way to download ebooks from your humblebundle account
The Unlicense
230 stars 27 forks source link

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

Open lestephane opened 4 years ago

lestephane commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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