1.8 KiB
1.8 KiB
2000 AD CBZ Downloader
Automatically downloads all CBZ files from your shop.2000ad.com account.
Setup
-
Create
.envfile with your credentials:cp .env.example .envThen edit
.envand add your email and password. -
Build the container:
docker-compose build
Usage
Run once (download all new files):
docker-compose up
Run in background:
docker-compose up -d
View logs:
docker-compose logs -f
Stop the container:
docker-compose down
File Structure
.
├── docker-compose.yml
├── Dockerfile
├── requirements.txt
├── download_cbz.py
├── .env (your credentials - not committed to git)
├── .env.example (template)
└── downloads/
└── (your CBZ files will be downloaded here)
Scheduled Downloads
To run automatically every day, edit docker-compose.yml and uncomment the command line:
command: sh -c "while true; do python download_cbz.py && sleep 86400; done"
Then change restart: "no" to restart: unless-stopped.
This will:
- Run the downloader immediately
- Wait 24 hours (86400 seconds)
- Run again
- Repeat forever
Troubleshooting
If downloads fail:
- Check your credentials in
.env - Run with logs visible:
docker-compose up(without-d) - Check that Firefox is working: The script will show login progress
If you want to see the browser:
- Edit
download_cbz.pyand changeheadless=Truetoheadless=False - Rebuild:
docker-compose build - You'll need X11 forwarding for this in Docker
Security Note
The .env file contains your password. Make sure to:
- Add
.envto.gitignoreif using git - Never commit credentials to version control
- Keep file permissions restricted:
chmod 600 .env