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
- Python 3.8+
- Google Chrome installed on your machine.
Installation
From Source (Editable Mode)
-
Clone the repository:
git clone https://github.com/yourusername/comicsaver.git cd comicsaver
-
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 toComics.-t,--threads: (Optional) Number of concurrent download threads (default: 1).--pdf: (Optional) Combine downloaded images into a single PDF file (namedComic - 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-managershould 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8c3915be5cf26f84ed1c4dac5abba177a8d11fb7280568bc9f7656a2b97b44b0
|
|
| MD5 |
50da2bc16b8bbd8f1537adc5e4f22f77
|
|
| BLAKE2b-256 |
300fb92128a2ff52e7557bec0069e5704b28f8b87b1f8958e30d9b1bd316759b
|
Provenance
The following attestation bundles were made for comicsaver-0.1.1.tar.gz:
Publisher:
publish.yml on akaazazel/comicsaver
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
comicsaver-0.1.1.tar.gz -
Subject digest:
8c3915be5cf26f84ed1c4dac5abba177a8d11fb7280568bc9f7656a2b97b44b0 - Sigstore transparency entry: 970583934
- Sigstore integration time:
-
Permalink:
akaazazel/comicsaver@991539cf34b9d9a799f32590f6531ac08a55f9d6 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/akaazazel
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@991539cf34b9d9a799f32590f6531ac08a55f9d6 -
Trigger Event:
release
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
804675d351016e11aeacf9ae8d0e24b7d30b5cf315c72d36efbba4822fb3bb6a
|
|
| MD5 |
af9102febcc3a3880b1780d5c3b2d700
|
|
| BLAKE2b-256 |
4a416876975e5613fca9a83e89b511886ad83899b794a44ff6344cc8ebfb197a
|
Provenance
The following attestation bundles were made for comicsaver-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on akaazazel/comicsaver
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
comicsaver-0.1.1-py3-none-any.whl -
Subject digest:
804675d351016e11aeacf9ae8d0e24b7d30b5cf315c72d36efbba4822fb3bb6a - Sigstore transparency entry: 970583976
- Sigstore integration time:
-
Permalink:
akaazazel/comicsaver@991539cf34b9d9a799f32590f6531ac08a55f9d6 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/akaazazel
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@991539cf34b9d9a799f32590f6531ac08a55f9d6 -
Trigger Event:
release
-
Statement type: