[mangatown] fix & update

- use BASE_PATTERN
- fix manga, manga_id, chapter_id extraction
- fix & extend 'manga' metadata results
- extend test results
This commit is contained in:
Mike Fährmann
2026-01-25 18:32:17 +01:00
parent befa9b8a3e
commit bf3ee5e9f7
2 changed files with 52 additions and 38 deletions

View File

@@ -10,36 +10,54 @@ from gallery_dl.extractor import mangatown
__tests__ = (
{
"#url" : "https://www.mangatown.com/manga/kimetsu_no_yaiba/c001/",
"#category": ("", "mangatown", "chapter"),
"#class" : mangatown.MangatownChapterExtractor,
"#pattern" : r"https://zjcdn\.mangahere\.org/.*",
"#count" : ">= 20",
"chapter" : 1,
"chapter_id" : 368511,
"chapter_minor": "",
"count" : 55,
"page" : range(1, 55),
"extension" : "jpg",
"filename" : str,
"lang" : "en",
"language" : "English",
"manga" : "Kimetsu no Yaiba",
"manga_id" : 21437,
"volume" : 0,
},
{
"#url" : "https://www.mangatown.com/manga/kimetsu_no_yaiba/c001/1.html",
"#category": ("", "mangatown", "chapter"),
"#class" : mangatown.MangatownChapterExtractor,
"#pattern" : r"https://zjcdn\.mangahere\.org/.*",
},
{
"#url" : "http://www.mangatown.com/manga/kimetsu_no_yaiba/c001/",
"#category": ("", "mangatown", "chapter"),
"#class" : mangatown.MangatownChapterExtractor,
},
{
"#url" : "https://www.mangatown.com/manga/kimetsu_no_yaiba/",
"#category": ("", "mangatown", "manga"),
"#class" : mangatown.MangatownMangaExtractor,
"#pattern" : mangatown.MangatownChapterExtractor.pattern,
"#count" : ">= 100",
"chapter" : int,
"chapter_minor": {"", ".5", ".6"},
"date" : str,
"lang" : "en",
"language" : "English",
"manga" : "Kimetsu no Yaiba",
"title" : str,
},
{
"#url" : "http://www.mangatown.com/manga/kimetsu_no_yaiba/",
"#category": ("", "mangatown", "manga"),
"#class" : mangatown.MangatownMangaExtractor,
},