[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:
Mike Fährmann
2025-06-10 20:48:16 +02:00
parent 4cfddc144a
commit 8e698d1a64
4 changed files with 28 additions and 3 deletions

View File

@@ -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):