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

Random issues with quick fixes #52

Open ankur-p opened 3 months ago

ankur-p commented 3 months ago

First of all, I'd like to thank you for writing up this script. It's been a great help :)

I've found a couple of little issues that I had to fix to get this to work properly in Docker.

main.py

107- f.write(response.content)
107+ f.write(r.content)

entrypoint.sh

1- pip install -r /app/requirements.txt
2- python /app/main.py -e $EMAIL -p $PASSWORD -d /app/book -b pdf,mobi,epub,code

1+ pip install -r /app/requirements.txt --trusted-host pypi.python.org --trusted-host files.pythonhosted.org --trusted-host pypi.org \
2+     && python /app/main.py -e $EMAIL -p $PASSWORD -d /app/book -b pdf,mobi,epub,code -s

Also, should probably add "book/" to .gitignore

I can open a quick PR for this if you want, or you can roll this into a future update. Feel free to let me know if you'd like me to do it, though.