sunnymh-manga-dl/CLAUDE.md
2026-04-11 16:55:13 +08:00

1.5 KiB

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Project Overview

Manga downloader for m.happymh.com. Reads manga URLs from manga.json and downloads chapter images into manga-content/.

Data Flow

  1. Input: manga.json — JSON array of manga URLs (e.g., ["https://m.happymh.com/manga/butiange"])
  2. Output: manga-content/<manga-name>/<chapter-number> <chapter-title>/*.jpg — downloaded page images
  3. Metadata: manga-content/<manga-name>/detail.json — stores manga/chapter metadata

Directory Convention

manga-content/
  butiange/
    detail.json
    1 第一回/
      1.jpg
      2.jpg
      3.jpg
    2 第二回/
      ...
  • Manga name is the URL slug (last path segment of the manga URL)
  • Chapter folders are named <number> <title> (e.g., 1 第一回)
  • Image filenames are sequential page numbers (1.jpg, 2.jpg, ...)

Metadata Format (detail.json)

Each manga folder contains a detail.json with fields:

  • mg-url — source URL on m.happymh.com
  • mg-title — manga title (Chinese)
  • mg-author — author name
  • mg-genres — array of genre tags
  • mg-description — synopsis text

Target Site

  • Base URL: https://m.happymh.com
  • Manga page: /manga/<slug> — contains chapter listing
  • Chapter page: /reads/<slug>/<chapter-id> — contains page images
  • The site is mobile-oriented; requests should use appropriate mobile User-Agent headers