[unsplash] update collections URL pattern (fixes #1627)
This commit is contained in:
@@ -172,13 +172,16 @@ class UnsplashFavoriteExtractor(UnsplashExtractor):
|
|||||||
class UnsplashCollectionExtractor(UnsplashExtractor):
|
class UnsplashCollectionExtractor(UnsplashExtractor):
|
||||||
"""Extractor for an unsplash collection"""
|
"""Extractor for an unsplash collection"""
|
||||||
subcategory = "collection"
|
subcategory = "collection"
|
||||||
pattern = BASE_PATTERN + r"/collections/(\d+)"
|
pattern = BASE_PATTERN + r"/collections/([^/?#]+)"
|
||||||
test = ("https://unsplash.com/collections/3178572/winter", {
|
test = (
|
||||||
"pattern": r"https://images\.unsplash\.com/(photo-\d+-\w+"
|
("https://unsplash.com/collections/3178572/winter", {
|
||||||
r"|reserve/[^/?#]+)\?ixid=\w+&ixlib=rb-1\.2\.1$",
|
"pattern": r"https://images\.unsplash\.com/(photo-\d+-\w+"
|
||||||
"range": "1-30",
|
r"|reserve/[^/?#]+)\?ixid=\w+&ixlib=rb-1\.2\.1$",
|
||||||
"count": 30,
|
"range": "1-30",
|
||||||
})
|
"count": 30,
|
||||||
|
}),
|
||||||
|
("https://unsplash.com/collections/_8qJQ2bCMWE/2021.05"),
|
||||||
|
)
|
||||||
|
|
||||||
def photos(self):
|
def photos(self):
|
||||||
url = "{}/napi/collections/{}/photos".format(self.root, self.item)
|
url = "{}/napi/collections/{}/photos".format(self.root, self.item)
|
||||||
|
|||||||
Reference in New Issue
Block a user