[hentaifoundry] add 'tag' extractor (#6465)

This commit is contained in:
Mike Fährmann
2024-11-13 18:23:06 +01:00
parent b62c466c14
commit a3276e3b5d
3 changed files with 29 additions and 1 deletions

View File

@@ -254,6 +254,22 @@ class HentaifoundryFavoriteExtractor(HentaifoundryExtractor):
self.root, self.user)
class HentaifoundryTagExtractor(HentaifoundryExtractor):
"""Extractor for tag searches on hentaifoundry.com"""
subcategory = "tag"
directory_fmt = ("{category}", "{search_tags}")
archive_fmt = "t_{search_tags}_{index}"
pattern = BASE_PATTERN + r"/pictures/tagged/([^/?#]+)"
example = "https://www.hentai-foundry.com/pictures/tagged/TAG"
def __init__(self, match):
HentaifoundryExtractor.__init__(self, match)
self.page_url = "{}/pictures/tagged/{}".format(self.root, self.user)
def metadata(self):
return {"search_tags": self.user}
class HentaifoundryRecentExtractor(HentaifoundryExtractor):
"""Extractor for 'Recent Pictures' on hentaifoundry.com"""
subcategory = "recent"