Parser¶
Extracts gallery JSON from an nhentai HTML page.
Used internally by NHentai.
nhentai.parser.Parser(html: str)
¶
Extracts gallery JSON from an nhentai HTML page.
Source code in nhentai/parser.py
parse_gallery_info() -> dict
¶
Parse and return the gallery info dict from the embedded window._gallery script.
Raises:
| Type | Description |
|---|---|
ValueError
|
If the script tag is missing or JSON is malformed. |