lmbringas / packtpub-downloader

Script to download all your books from PacktPub inspired by https://github.com/ozzieperez/packtpub-library-downloader
267 stars 84 forks source link

packtpub-downloader for python3 not working #23

Open ranjennaidu21 opened 5 years ago

ranjennaidu21 commented 5 years ago

HI I have run the following code using python3: python3 main.py -e <myemail> -p <mypassword> -d ~/Desktop/packt -b pdf

getting this issue, but my email and password was correct. It have $ symbol for the password but it should not be the issue right ? anyone face this issue before ?


Error login,  check user and password
Traceback (most recent call last):
  File "main.py", line 226, in <module>
    main(sys.argv[1:])
  File "main.py", line 195, in main
    user = User(email, password)
  File "/home/ranjen/softwares/packtpub-downloader-master/user.py", line 24, in __init__
    self.header["Authorization"] = self.get_token()
  File "/home/ranjen/softwares/packtpub-downloader-master/user.py", line 39, in get_token
    print("Error {}".format(e))
NameError: name 'e' is not defined
BurnhamG commented 5 years ago

Hi @ranjennaidu21, I would try putting single quotes (') around your username and password. Let me know if that still gives you an error.

cromat commented 4 years ago

@BurnhamG same error for me. With quotes also.

cromat commented 4 years ago

Despite that e is nowhere declared, the main problem (after declaring e) is authorization with pactpub api which now also requires captcha. I think the only way now is to implement a popup which will prompt user captcha answer.