[pixiv] add 'full-series' option for novels (#4111)
This commit is contained in:
@@ -2436,6 +2436,17 @@ Description
|
||||
Download images embedded in novels.
|
||||
|
||||
|
||||
extractor.pixiv.novel.full-series
|
||||
---------------------------------
|
||||
Type
|
||||
``bool``
|
||||
Default
|
||||
``false``
|
||||
Description
|
||||
When downloading a novel being part of a series,
|
||||
download all novels of that series.
|
||||
|
||||
|
||||
extractor.pixiv.metadata
|
||||
------------------------
|
||||
Type
|
||||
|
||||
@@ -796,6 +796,11 @@ class PixivNovelExtractor(PixivExtractor):
|
||||
"options": (("embeds", True),),
|
||||
"count": 3,
|
||||
}),
|
||||
# full series
|
||||
("https://www.pixiv.net/novel/show.php?id=19612040", {
|
||||
"options": (("full-series", True),),
|
||||
"count": 4,
|
||||
}),
|
||||
# short URL
|
||||
("https://www.pixiv.net/n/19612040"),
|
||||
)
|
||||
@@ -893,7 +898,11 @@ class PixivNovelExtractor(PixivExtractor):
|
||||
yield Message.Queue, url, novel
|
||||
|
||||
def novels(self):
|
||||
return (self.api.novel_detail(self.novel_id),)
|
||||
novel = self.api.novel_detail(self.novel_id)
|
||||
if self.config("full-series") and novel["series"]:
|
||||
self.subcategory = PixivNovelSeriesExtractor.subcategory
|
||||
return self.api.novel_series(novel["series"]["id"])
|
||||
return (novel,)
|
||||
|
||||
|
||||
class PixivNovelUserExtractor(PixivNovelExtractor):
|
||||
|
||||
Reference in New Issue
Block a user