[ytdl] set domain as subcategory when using Generic extractor (#6582)
https://github.com/mikf/gallery-dl/issues/6582#issuecomment-2959879730
This commit is contained in:
@@ -42,8 +42,14 @@ class YoutubeDLExtractor(Extractor):
|
||||
raise exception.NoExtractorError()
|
||||
self.force_generic_extractor = False
|
||||
|
||||
# set subcategory to youtube_dl extractor's key
|
||||
self.subcategory = self.ytdl_ie_key
|
||||
if self.ytdl_ie_key == "Generic" and config.interpolate(
|
||||
("extractor", "ytdl"), "generic-category", True):
|
||||
# set subcategory to URL domain
|
||||
self.category = "ytdl-generic"
|
||||
self.subcategory = url[url.rfind("/", None, 8)+1:url.find("/", 8)]
|
||||
else:
|
||||
# set subcategory to youtube_dl extractor's key
|
||||
self.subcategory = self.ytdl_ie_key
|
||||
Extractor.__init__(self, match)
|
||||
|
||||
def items(self):
|
||||
|
||||
Reference in New Issue
Block a user