Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Having this issues - Does this still work? #43

Open
mayhemonger opened this issue Jul 21, 2021 · 1 comment
Open

Having this issues - Does this still work? #43

mayhemonger opened this issue Jul 21, 2021 · 1 comment

Comments

@mayhemonger
Copy link

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'

@crodgersfl
Copy link

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants