[mangadex] prevent KeyError for manga without English title

This commit is contained in:
Mike Fährmann
2021-08-21 14:44:37 +02:00
parent 20ee091289
commit ddd175de77

View File

@@ -61,7 +61,8 @@ class MangadexExtractor(Extractor):
chnum, sep, minor = 0, "", ""
data = {
"manga" : mattributes["title"]["en"],
"manga" : (mattributes["title"].get("en") or
next(iter(mattributes["title"].values()))),
"manga_id": manga["data"]["id"],
"title" : cattributes["title"],
"volume" : text.parse_int(cattributes["volume"]),