Skip to content

Commit

Permalink
[naverwebtoon] fix 'title' for comics with empty tags (#5120)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikf committed Jan 27, 2024
1 parent 3433481 commit 22647c2
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion gallery_dl/extractor/naverwebtoon.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def metadata(self, page):
"episode" : self.episode,
"comic" : extr('titleName: "', '"'),
"tags" : [t.strip() for t in text.extract_iter(
extr("tagList: [", "}],"), '"tagName":"', '"')],
extr("tagList: [", "],"), '"tagName":"', '"')],
"title" : extr('"subtitle":"', '"'),
"author" : [a.strip() for a in text.extract_iter(
extr('"writers":[', ']'), '"name":"', '"')],
Expand Down
18 changes: 18 additions & 0 deletions test/results/naverwebtoon.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,24 @@
"title_id" : "765124",
},

{
"#url" : "https://comic.naver.com/bestChallenge/detail?titleId=620732&no=334",
"#comment" : "empty tags (#5120)",
"#category": ("", "naverwebtoon", "episode"),
"#class" : naverwebtoon.NaverwebtoonEpisodeExtractor,
"#count" : 9,

"artist" : [],
"author" : ["안트로anthrokim"],
"comic" : "백일몽화원",
"count" : 9,
"episode" : "334",
"num" : range(1, 9),
"tags" : [],
"title" : "321화... 성(省)",
"title_id": "620732",
},

{
"#url" : "https://comic.naver.com/bestChallenge/detail.nhn?titleId=771467&no=3",
"#category": ("", "naverwebtoon", "episode"),
Expand Down

0 comments on commit 22647c2

Please sign in to comment.