Python API for accessing and downloading content from JMComic with Cloudflare bypass and plugin system.
npx @tessl/cli install tessl/pypi-jmcomic@2.6.0A comprehensive Python API for accessing and downloading content from JMComic (禁漫天堂), a digital comic platform. JMComic provides advanced features including Cloudflare anti-bot bypass mechanisms, multi-client architecture with automatic domain switching, extensive plugin system, and robust download management capabilities.
pip install jmcomicimport jmcomicCommon usage patterns:
from jmcomic import download_album, download_photo, create_optionFor advanced usage:
from jmcomic import JmDownloader, JmOption, JmAlbumDetail, JmPhotoDetailimport jmcomic
# Simple album download using default settings
album, downloader = jmcomic.download_album("123456")
# Download with custom configuration
option = jmcomic.create_option_by_file("config.yml")
album, downloader = jmcomic.download_album("123456", option=option)
# Download multiple albums
album_ids = ["123456", "789012", "345678"]
results = jmcomic.download_batch(jmcomic.download_album, album_ids)
# Create a downloader with custom options
downloader = jmcomic.new_downloader(option)
album = downloader.download_album("123456")JMComic uses a modular, plugin-based architecture designed for extensibility and reliability:
This design enables reliable content downloading while providing extensive customization through plugins and configuration options.
High-level download functions for albums and photos with batch processing capabilities. These functions provide the main interface for downloading content with automatic retry and error handling.
def download_album(jm_album_id, option=None, downloader=None, callback=None, check_exception=True): ...
def download_photo(jm_photo_id, option=None, downloader=None, callback=None, check_exception=True): ...
def download_batch(download_api, jm_id_iter, option=None, downloader=None): ...
def new_downloader(option=None, downloader=None): ...Data models representing albums, photos, images, and search results with rich metadata and download capabilities. These entities provide structured access to content information and download operations.
class JmAlbumDetail: ...
class JmPhotoDetail: ...
class JmImageDetail: ...
class JmSearchPage: ...Comprehensive download management with support for callbacks, progress tracking, and specialized download behaviors. Provides fine-grained control over the download process.
class JmDownloader: ...
class DownloadCallback: ...
def catch_exception(func): ...Flexible configuration system supporting YAML/JSON files, environment variables, and programmatic configuration. Enables customization of download behavior, client settings, and plugin options.
class JmOption: ...
class DirRule: ...
def create_option_by_file(filepath): ...
def create_option_by_env(env_name='JM_OPTION_PATH'): ...
def create_option_by_str(text, mode=None): ...Multi-client architecture with web scraping and mobile API clients, automatic domain switching, and retry mechanisms. Provides robust access to JMComic content with Cloudflare bypass capabilities.
class JmHtmlClient: ...
class JmApiClient: ...
class JmcomicClient: ...Extensible plugin framework with 18+ built-in plugins for various use cases including login, monitoring, notifications, content processing, and advanced download features.
class JmOptionPlugin: ...
class JmLoginPlugin: ...
class ZipPlugin: ...
class FindUpdatePlugin: ...Specialized utilities for text processing, HTML parsing, image processing, and cryptographic operations. These tools support the core functionality with URL parsing, data extraction, and content processing.
class JmcomicText: ...
class JmPageTool: ...
class JmImageTool: ...
class JmCryptoTool: ...Comprehensive exception hierarchy with context support for robust error handling and debugging. Provides specific error types for different failure scenarios.
class JmcomicException: ...
class ResponseUnexpectedException: ...
class RegularNotMatchException: ...
class PartialDownloadFailedException: ...Command-line interface for interactive downloads and batch operations with environment variable support.
class JmcomicUI: ...
def main(): ...
def get_env(name, default): ...