[civitai] add 'videos' extractor (#6644)

This commit is contained in:
Mike Fährmann
2025-08-16 11:08:37 +02:00
parent c2b11dd475
commit e599e3f0d6
4 changed files with 23 additions and 1 deletions

View File

@@ -463,6 +463,17 @@ class CivitaiImagesExtractor(CivitaiExtractor):
return self.api.images(params)
class CivitaiVideosExtractor(CivitaiExtractor):
subcategory = "videos"
pattern = BASE_PATTERN + r"/videos(?:/?\?([^#]+))?(?:$|#)"
example = "https://civitai.com/videos"
def images(self):
params = self._parse_query(self.groups[0])
params["types"] = ("video",)
return self.api.images(params)
class CivitaiPostsExtractor(CivitaiExtractor):
subcategory = "posts"
pattern = BASE_PATTERN + r"/posts(?:/?\?([^#]+))?(?:$|#)"