[weebdex] make metadata extraction non-fatal (#8939)

This commit is contained in:
Mike Fährmann
2026-01-26 16:44:29 +01:00
parent 7784aed74e
commit 9a102039fc
2 changed files with 41 additions and 12 deletions

View File

@@ -126,15 +126,16 @@ def _manga_info(self, mid):
rel = manga["relationships"]
return {
"manga" : manga["title"],
"manga_id": manga["id"],
"manga_date": self.parse_datetime_iso(manga["created_at"]),
"year" : manga["year"],
"status" : manga["status"],
"origin" : manga["language"],
"description": manga["description"],
"demographic": manga["demographic"],
"tags" : [f"{t['group']}:{t['name']}" for t in rel["tags"]],
"author" : [a["name"] for a in rel["authors"]],
"artist" : [a["name"] for a in rel["artists"]],
"manga" : manga.get("title"),
"manga_id": manga.get("id"),
"manga_date": self.parse_datetime_iso(manga.get("created_at")),
"year" : manga.get("year"),
"status" : manga.get("status"),
"origin" : manga.get("language"),
"description": manga.get("description"),
"demographic": manga.get("demographic"),
"tags" : [f"{t['group']}:{t['name']}"
for t in rel.get("tags") or ()],
"author" : [a["name"] for a in rel.get("authors") or ()],
"artist" : [a["name"] for a in rel.get("artists") or ()],
}

View File

@@ -83,7 +83,7 @@ ___
"manga_id" : "3o0icxno26",
"origin" : "ja",
"title" : "Cuộc hẹn tại phía Đông vườn địa đàng",
"uploader" : "wSwPTgL",
"uploader" : str,
"version" : 1,
"volume" : 2,
"year" : 2021,
@@ -102,6 +102,34 @@ ___
),
},
{
"#url" : "https://weebdex.org/chapter/spsn025m8a",
"#comment" : "no 'demographic' data (#8939)",
"#class" : weebdex.WeebdexChapterExtractor,
"#count" : 49,
"artist" : ["Fuugetsu Makoto"],
"author" : ["Koyagi Mei"],
"chapter" : 1,
"chapter_id" : "spsn025m8a",
"chapter_minor": "",
"count" : 49,
"date" : "dt:2026-01-19 11:12:36",
"demographic" : None,
"group" : ["Asmodeus Scans"],
"lang" : "en",
"manga" : "Yuusha no Sensei, Saikyou no Kuzu ni naru. ~S-kyuu Party no Moto Eiyuu, Ura Shakai no Ihou Guild de Nariagari~",
"manga_date" : "dt:2025-10-09 09:21:18",
"manga_id" : "vtyi8syfjd",
"origin" : "ja",
"original" : True,
"title" : "",
"uploader" : "asmodai",
"version" : 1,
"volume" : 1,
"year" : 2023,
},
{
"#url" : "https://weebdex.org/title/3o0icxno26/ani-datta-mono",
"#class" : weebdex.WeebdexMangaExtractor,