or run

npx @tessl/cli init
Log in

Version

Tile

Overview

Evals

Files

docs

client-system.mdcommand-line-interface.mdconfiguration-management.mdcontent-entities.mdcore-download-api.mddownload-system.mdexception-handling.mdindex.mdplugin-system.mdtext-data-processing.md
tile.json

tessl/pypi-jmcomic

Python API for accessing and downloading content from JMComic with Cloudflare bypass and plugin system.

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
pypipkg:pypi/jmcomic@2.6.x

To install, run

npx @tessl/cli install tessl/pypi-jmcomic@2.6.0

index.mddocs/

JMComic

A 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.

Package Information

  • Package Name: jmcomic
  • Language: Python
  • Installation: pip install jmcomic

Core Imports

import jmcomic

Common usage patterns:

from jmcomic import download_album, download_photo, create_option

For advanced usage:

from jmcomic import JmDownloader, JmOption, JmAlbumDetail, JmPhotoDetail

Basic Usage

import 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")

Architecture

JMComic uses a modular, plugin-based architecture designed for extensibility and reliability:

  • Multi-Client System: Web scraping client with Cloudflare bypass and mobile API client with encryption support
  • Plugin Framework: 18+ built-in plugins for various use cases with extensible plugin system
  • Entity Model: Structured data models for albums, photos, images, and search results
  • Configuration System: Flexible YAML/JSON configuration with environment variable support
  • Download Management: Multi-threaded downloads with resume capabilities and error recovery

This design enables reliable content downloading while providing extensive customization through plugins and configuration options.

Capabilities

Core Download API

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): ...

Core Download API

Content Entities

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: ...

Content Entities

Download System

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): ...

Download System

Configuration Management

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): ...

Configuration Management

Client System

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: ...

Client System

Plugin System

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: ...

Plugin System

Text and Data Processing

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: ...

Text and Data Processing

Exception Handling

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: ...

Exception Handling

Command Line Interface

Command-line interface for interactive downloads and batch operations with environment variable support.

class JmcomicUI: ...
def main(): ...
def get_env(name, default): ...

Command Line Interface