mirror of
https://github.com/mikf/gallery-dl.git
synced 2025-01-31 19:51:34 +01:00
[naverwebtoon] support '/webtoon/' paths for all comics (#5123)
This commit is contained in:
parent
0dacb2b24c
commit
de752eb7b1
@ -79,9 +79,6 @@ class NaverwebtoonComicExtractor(NaverwebtoonBase, Extractor):
|
||||
self.sort = query.get("sort", "ASC")
|
||||
|
||||
def items(self):
|
||||
base = "{}/{}/detail?titleId={}&no=".format(
|
||||
self.root, self.path, self.title_id)
|
||||
|
||||
url = self.root + "/api/article/list"
|
||||
headers = {
|
||||
"Accept": "application/json, text/plain, */*",
|
||||
@ -95,6 +92,10 @@ class NaverwebtoonComicExtractor(NaverwebtoonBase, Extractor):
|
||||
while True:
|
||||
data = self.request(url, headers=headers, params=params).json()
|
||||
|
||||
path = data["webtoonLevelCode"].lower().replace("_c", "C", 1)
|
||||
base = "{}/{}/detail?titleId={}&no=".format(
|
||||
self.root, path, data["titleId"])
|
||||
|
||||
for article in data["articleList"]:
|
||||
article["_extractor"] = NaverwebtoonEpisodeExtractor
|
||||
yield Message.Queue, base + str(article["no"]), article
|
||||
|
@ -95,6 +95,15 @@ __tests__ = (
|
||||
"#count" : 32,
|
||||
},
|
||||
|
||||
{
|
||||
"#url" : "https://comic.naver.com/webtoon/list?titleId=765124",
|
||||
"#comment" : "/webtoon/ path for 'challenge' comic (#5123)",
|
||||
"#category": ("", "naverwebtoon", "comic"),
|
||||
"#class" : naverwebtoon.NaverwebtoonComicExtractor,
|
||||
"#range" : "1",
|
||||
"#urls" : "https://comic.naver.com/challenge/detail?titleId=765124&no=1",
|
||||
},
|
||||
|
||||
{
|
||||
"#url" : "https://comic.naver.com/challenge/list?titleId=765124",
|
||||
"#category": ("", "naverwebtoon", "comic"),
|
||||
|
Loading…
x
Reference in New Issue
Block a user