Files
Iain Bradley 4ca7f9667a First commit
2025-10-07 12:55:34 +01:00

1.8 KiB

2000 AD CBZ Downloader

Automatically downloads all CBZ files from your shop.2000ad.com account.

Setup

  1. Create .env file with your credentials:

    cp .env.example .env
    

    Then edit .env and add your email and password.

  2. 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.py and change headless=True to headless=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 .env to .gitignore if using git
  • Never commit credentials to version control
  • Keep file permissions restricted: chmod 600 .env