packt-cli / Packt-Publishing-Free-Learning

Scripts that automatically claim and download free daily eBooks from https://www.packtpub.com/packt/offers/free-learning

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Need an option to just download today's book

eharris opened this issue · comments

There's a -g to grab today's book, and -gd to grab and download it. Where is the -d to just download it? Or alternatively a -dt option (download this, a book specified on the command line, rather than having to edit/munge the config file)? Or even another alternative, make -gd smart enough not to try to grab the book again if it's already on your account, and just download it.

I don't use (or want to use) the anticaptcha, so I'm perfectly happy to login and get the book myself if it is something I want, I just want to use this to download today's book automatically in a cronjob after it's already in my account, which doesn't require captcha.

I've written a script that checks todays ebook, and sends me an email with the title, then if it's something I want I can grab it.

Currently if I try to use -gd, it complains that there's no section in the config file for ANTICAPTCHA_DATA. As a workaround, I've hacked the script not to look for the anticaptcha config, and to skip attempting the grab and instead only download.

You can use -da option, it will download all the books, The first book will be always the last one. As 'today's book' doesn't mean the book grabbed today because if you have such title already grabbed, it will not be at the top of the list of your books [https://www.packtpub.com/account/my-ebooks]. That's why such feature will not be implemented here : )
Regards!