[pixiv] add workaround for 'novel-*' includes (#7746)
This commit is contained in:
@@ -879,12 +879,16 @@ class Dispatch():
|
|||||||
def initialize(self):
|
def initialize(self):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def _dispatch_extractors(self, extractor_data, default=()):
|
def _dispatch_extractors(self, extractor_data, default=(), alt=None):
|
||||||
extractors = {
|
extractors = {
|
||||||
data[0].subcategory: data
|
data[0].subcategory: data
|
||||||
for data in extractor_data
|
for data in extractor_data
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if alt is not None:
|
||||||
|
for sub, sub_alt in alt:
|
||||||
|
extractors[sub_alt] = extractors[sub]
|
||||||
|
|
||||||
include = self.config("include", default) or ()
|
include = self.config("include", default) or ()
|
||||||
if include == "all":
|
if include == "all":
|
||||||
include = extractors
|
include = extractors
|
||||||
|
|||||||
@@ -392,7 +392,10 @@ class PixivUserExtractor(Dispatch, PixivExtractor):
|
|||||||
(PixivFavoriteExtractor , base + "bookmarks/artworks"),
|
(PixivFavoriteExtractor , base + "bookmarks/artworks"),
|
||||||
(PixivNovelBookmarkExtractor, base + "bookmarks/novels"),
|
(PixivNovelBookmarkExtractor, base + "bookmarks/novels"),
|
||||||
(PixivNovelUserExtractor , base + "novels"),
|
(PixivNovelUserExtractor , base + "novels"),
|
||||||
), ("artworks",))
|
), ("artworks",), (
|
||||||
|
("bookmark", "novel-bookmark"),
|
||||||
|
("user" , "novel-user"),
|
||||||
|
))
|
||||||
|
|
||||||
|
|
||||||
class PixivArtworksExtractor(PixivExtractor):
|
class PixivArtworksExtractor(PixivExtractor):
|
||||||
|
|||||||
Reference in New Issue
Block a user