[mangadex] fix 'RuntimeError' for titles without a 'description' (#8389)
fixes regression introduced in 0a76cbc8c7
This commit is contained in:
@@ -450,13 +450,13 @@ def _manga_info(self, uuid):
|
||||
|
||||
return {
|
||||
"manga" : (mattr["title"].get("en") or
|
||||
next(iter(mattr["title"].values()))),
|
||||
next(iter(mattr["title"].values()), "")),
|
||||
"manga_id": manga["id"],
|
||||
"manga_titles": [t.popitem()[1]
|
||||
for t in mattr.get("altTitles") or ()],
|
||||
"manga_date" : text.parse_datetime(mattr.get("createdAt")),
|
||||
"description" : (mattr["description"].get("en") or
|
||||
next(iter(mattr["description"].values()))),
|
||||
next(iter(mattr["description"].values()), "")),
|
||||
"demographic": mattr.get("publicationDemographic"),
|
||||
"origin": mattr.get("originalLanguage"),
|
||||
"status": mattr.get("status"),
|
||||
|
||||
@@ -178,6 +178,15 @@ __tests__ = (
|
||||
"#count" : ">= 20",
|
||||
},
|
||||
|
||||
{
|
||||
"#url" : "https://mangadex.org/title/2e73a1ac-bf26-4c04-84f6-d0a22fd37624/tomodachi-no-joshi-ni-josou-saserare-danshi",
|
||||
"#comment" : "no 'description' (#8389)",
|
||||
"#class" : mangadex.MangadexMangaExtractor,
|
||||
"#count" : 47,
|
||||
|
||||
"description": "",
|
||||
},
|
||||
|
||||
{
|
||||
"#url" : "https://mangadex.org/titles/feed",
|
||||
"#class" : mangadex.MangadexFeedExtractor,
|
||||
|
||||
Reference in New Issue
Block a user