diff --git a/docs/supportedsites.rst b/docs/supportedsites.rst index cab9e1b8..70420a93 100644 --- a/docs/supportedsites.rst +++ b/docs/supportedsites.rst @@ -97,7 +97,7 @@ Turboimagehost https://turboimagehost.com/ individual Images .. |Images from Use-0| replace:: Images from Users, Albums, Challenges, individual Images, Likes, Search Results .. |Collections, De-1| replace:: Collections, Deviations, Favorites, Folders, Galleries, Journals, Popular Images .. |Images from Use-2| replace:: Images from Users, Albums, Favorites, Galleries, Groups, individual Images, Search Results -.. |Images from Use-3| replace:: Images from Users, Favorites, individual Images, Scraps +.. |Images from Use-3| replace:: Images from Users, Favorites, individual Images, Popular Images, Recent Images, Scraps .. |Images from Use-4| replace:: Images from Users, Doujin, Favorites, individual Images .. |Images from Use-5| replace:: Images from Users, Favorites, Follows, pixiv.me Links, Rankings, Search Results, Individual Images .. |Albums, individ-6| replace:: Albums, individual Images, Images from Users and Folders diff --git a/gallery_dl/extractor/hentaifoundry.py b/gallery_dl/extractor/hentaifoundry.py index 3d79f892..e080df17 100644 --- a/gallery_dl/extractor/hentaifoundry.py +++ b/gallery_dl/extractor/hentaifoundry.py @@ -189,6 +189,39 @@ class HentaifoundryFavoriteExtractor(HentaifoundryExtractor): self.url = "{}/user/{}/faves/pictures".format(self.root, self.user) +class HentaifoundryRecentExtractor(HentaifoundryExtractor): + """Extractor for 'Recent Pictures' on hentaifoundry.com""" + subcategory = "recent" + directory_fmt = ["{category}", "Recent Pictures", "{date}"] + archive_fmt = "r_{index}" + pattern = [r"(?:https?://)?(?:www\.)?hentai-foundry\.com" + r"/pictures/recent/(\d+-\d+-\d+)(?:/page/(\d+))?"] + test = [("http://www.hentai-foundry.com/pictures/recent/2018-09-20", None)] + + def __init__(self, match): + HentaifoundryExtractor.__init__(self, "", match.group(2)) + self.date = match.group(1) + self.url = "{}/pictures/recent/{}".format(self.root, self.date) + + def get_job_metadata(self): + self.request(self.root + "/?enterAgree=1") + return {"date": self.date} + + +class HentaifoundryPopularExtractor(HentaifoundryExtractor): + """Extractor for popular images on hentaifoundry.com""" + subcategory = "popular" + directory_fmt = ["{category}", "Popular Pictures"] + archive_fmt = "p_{index}" + pattern = [r"(?:https?://)?(?:www\.)?hentai-foundry\.com" + r"/pictures/popular(?:/page/(\d+))?"] + test = [("http://www.hentai-foundry.com/pictures/popular", None)] + + def __init__(self, match): + HentaifoundryExtractor.__init__(self, "", match.group(1)) + self.url = self.root + "/pictures/popular" + + class HentaifoundryImageExtractor(HentaifoundryExtractor): """Extractor for a single image from hentaifoundry.com""" subcategory = "image" diff --git a/scripts/build_supportedsites.py b/scripts/build_supportedsites.py index 7161b487..f0698dd7 100755 --- a/scripts/build_supportedsites.py +++ b/scripts/build_supportedsites.py @@ -74,6 +74,7 @@ SUBCATEGORY_MAP = { "path" : "Images from Users and Folders", "pinit" : "pin.it Links", "popular": "Popular Images", + "recent" : "Recent Images", "search" : "Search Results", "status" : "Images from Statuses", "tag" : "Tag-Searches",