packtpub-downloader icon indicating copy to clipboard operation
packtpub-downloader copied to clipboard

Having this issues - Does this still work?

Open mayhemonger opened this issue 4 years ago • 1 comments

You are in! Traceback (most recent call last): File "/Users/xx/Downloads/packtpub-downloader-master/main.py", line 226, in main(sys.argv[1:]) File "/Users/xx/Downloads/packtpub-downloader-master/main.py", line 198, in main books = get_books(user, is_verbose=verbose, is_quiet=quiet) File "/Users/xx/Downloads/packtpub-downloader-master/main.py", line 41, in get_books print(f'You have {str(r.json()["count"])} books') KeyError: 'count'

mayhemonger avatar Jul 21 '21 13:07 mayhemonger

I just downloaded the files and ran the scripts in a VirtualBox installation of LinuxMint, with python3 and pip installed.

It looks like you are able to run python (maybe check the version).
Did you pass your email and password on the line? It looks like the count of books is coming back as 0 or undefined. When you log into PacktPub.com with your email address and password, go under Account and My Owned Books and see if you see books that you own.

I was able to download all pdf, mobi, epub and zip (code) files for over 300 books that I own using this tool (FEB 2022), so as of now it works. Not sure it it was working when you tried it (maybe updates have occurred to the Packtpub api and this script since you tried last).

crodgersfl avatar Feb 05 '22 19:02 crodgersfl