1.5 KiB
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
- Input:
manga.json— JSON array of manga URLs (e.g.,["https://m.happymh.com/manga/butiange"]) - Output:
manga-content/<manga-name>/<chapter-number> <chapter-title>/*.jpg— downloaded page images - 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.commg-title— manga title (Chinese)mg-author— author namemg-genres— array of genre tagsmg-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