Skip to main content

A command-line tool to download comics from readcomiconline.li

Project description

ComicSaver

A robust, Selenium-based command-line tool designed to scrape and download high-quality comic images from readcomiconline.li. It handles Cloudflare protection, JavaScript-rendered content, and lazy-loading images automatically.

Features

  • Bypasses Protection: Uses Selenium with headless Chrome to handle Cloudflare and dynamic JavaScript.
  • Smart Scrolling: Implements an "incremental scrolling with patience" algorithm to ensure all lazy-loaded images are captured, even on slow connections.
  • Organized Output: Automatically creates a structured directory hierarchy: Output/ComicName/IssueName/.
  • Flexible: Scrape a single issue or an entire comic series (work in progress for full series recursion, currently optimized for single issues).
  • PDF Generation: Optionally convert downloaded images into a single, named PDF file.
  • Headless Mode: Runs silently in the background by default.

Prerequisites

Installation

From Source (Editable Mode)

  1. Clone the repository:

    git clone https://github.com/yourusername/comicsaver.git
    cd comicsaver
    
  2. Install the package with pip:

    pip install .
    

    (Or pip install -e . for editable mode)

From PyPI

pip install comicsaver

Usage

Once installed, use the comicsaver command directly:

comicsaver [URL] [OPTIONS]

Or run via Python module:

python -m comicsaver.cli [URL] [OPTIONS]

Arguments

  • URL: The URL of the comic issue or main page (e.g., https://readcomiconline.li/Comic/JLA-Avengers/Issue-1).
  • -o, --output: (Optional) The directory to save downloaded comics. Defaults to Comics.
  • -t, --threads: (Optional) Number of concurrent download threads (default: 1).
  • --pdf: (Optional) Combine downloaded images into a single PDF file (named Comic - Issue.pdf).
  • --headless: (Optional) Run the browser in headless mode (no UI). Useful for background tasks.

Examples

Download a specific issue:

comicsaver "https://readcomiconline.li/Comic/JLA-Avengers/Issue-1" -o MyComics --headless --pdf -t 5

Download with visible browser (for debugging):

comicsaver "https://readcomiconline.li/Comic/JLA-Avengers/Issue-1"

Project Structure

comicsaver/
├── src/
│   └── comicsaver/
│       ├── __init__.py
│       └── cli.py       # Main scraper logic
├── pyproject.toml       # Package configuration
├── requirements.txt     # Python dependencies
├── .gitignore           # Git ignore rules
└── README.md            # Project documentation

Troubleshooting

  • "No images found": Ensure your internet connection is stable. The script waits for images to load, but extremely slow connections might timeout.
  • Chrome driver errors: The webdriver-manager should handle driver installation automatically. If it fails, try upgrading it: pip install --upgrade webdriver-manager.

AI Development

This project was developed with the assistance of AI. The core logic, including Selenium handling, lazy loading algorithms, and PDF generation features, was implemented through collaboration with an AI coding assistant. The AI helped in debugging, optimizing, and structuring the codebase for better maintainability and performance.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

comicsaver-0.1.1.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

comicsaver-0.1.1-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

Details for the file comicsaver-0.1.1.tar.gz.

File metadata

  • Download URL: comicsaver-0.1.1.tar.gz
  • Upload date:
  • Size: 7.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for comicsaver-0.1.1.tar.gz
Algorithm Hash digest
SHA256 8c3915be5cf26f84ed1c4dac5abba177a8d11fb7280568bc9f7656a2b97b44b0
MD5 50da2bc16b8bbd8f1537adc5e4f22f77
BLAKE2b-256 300fb92128a2ff52e7557bec0069e5704b28f8b87b1f8958e30d9b1bd316759b

See more details on using hashes here.

Provenance

The following attestation bundles were made for comicsaver-0.1.1.tar.gz:

Publisher: publish.yml on akaazazel/comicsaver

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file comicsaver-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: comicsaver-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 8.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for comicsaver-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 804675d351016e11aeacf9ae8d0e24b7d30b5cf315c72d36efbba4822fb3bb6a
MD5 af9102febcc3a3880b1780d5c3b2d700
BLAKE2b-256 4a416876975e5613fca9a83e89b511886ad83899b794a44ff6344cc8ebfb197a

See more details on using hashes here.

Provenance

The following attestation bundles were made for comicsaver-0.1.1-py3-none-any.whl:

Publisher: publish.yml on akaazazel/comicsaver

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page