mirror of
https://github.com/mikf/gallery-dl.git
synced 2025-01-31 19:51:34 +01:00
[hentaifoundry] add 'popular' and 'recent' extractors
for "Popular Pictures" and "Recent Pictures" listings
This commit is contained in:
parent
a5fc311dfa
commit
c402cc4047
@ -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
|
||||
|
@ -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"
|
||||
|
@ -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",
|
||||
|
Loading…
x
Reference in New Issue
Block a user