The last inclusion of try-except code messed up with Crtl-C and Ctrl-Break. Also, by checking only the existence of a PDF file to skip the download causes the EPUB to be skipped as well, which is undesirable. This patch fixes those. However, it runs slower even though all books have been downloaded, but much faster than the original one. This is because some books do not have EPUB and the script will probe since those books are non-existence on the local drive, thus taking up more time.
I also included a simple command-line options to choose either to download PDF only or EPUB only. It will download both book formats if no option is given. There is an option to choose where to store all the downloaded files. By default the download folder is ./downloads.
As a side note, if you choose to download PDF only and provided that you have all the books on your drive, it runs as fast as Dovyski's modification because it will not probe for the missing EPUBs.
Hi Alex, by the default the download folder is ./downloads if user does not provide one. Also, I have updated the README.MD on the usage. Please have a look.
The last inclusion of
try-except
code messed up withCrtl-C
andCtrl-Break
. Also, by checking only the existence of aPDF
file to skip the download causes theEPUB
to be skipped as well, which is undesirable. This patch fixes those. However, it runs slower even though all books have been downloaded, but much faster than the original one. This is because some books do not haveEPUB
and the script will probe since those books are non-existence on the local drive, thus taking up more time.I also included a simple command-line options to choose either to download PDF only or EPUB only. It will download both book formats if no option is given. There is an option to choose where to store all the downloaded files. By default the download folder is
./downloads
.As a side note, if you choose to download PDF only and provided that you have all the books on your drive, it runs as fast as Dovyski's modification because it will not probe for the missing EPUBs.