Skip to content

Commit

Permalink
[mangadex] prevent KeyError for manga without English title
Browse files Browse the repository at this point in the history
  • Loading branch information
mikf committed Aug 21, 2021
1 parent 20ee091 commit ddd175d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gallery_dl/extractor/mangadex.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ def _transform(self, chapter):
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"]),
Expand Down

0 comments on commit ddd175d

Please sign in to comment.