summaryrefslogtreecommitdiffstats
path: root/gallery_dl/extractor/unsplash.py
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@unit193.net>2021-06-22 22:30:36 -0400
committerLibravatarUnit 193 <unit193@unit193.net>2021-06-22 22:30:36 -0400
commit32de2b06db501c7de81678bce8e3e0c3e63d340c (patch)
treefd58a26618a73de0faaf3e9c435a806aed7eced3 /gallery_dl/extractor/unsplash.py
parent8a644b7a06c504263a478d3681eed10b4161b5be (diff)
New upstream version 1.18.0.upstream/1.18.0
Diffstat (limited to 'gallery_dl/extractor/unsplash.py')
-rw-r--r--gallery_dl/extractor/unsplash.py17
1 files changed, 10 insertions, 7 deletions
diff --git a/gallery_dl/extractor/unsplash.py b/gallery_dl/extractor/unsplash.py
index e89a5b7..6cfc69e 100644
--- a/gallery_dl/extractor/unsplash.py
+++ b/gallery_dl/extractor/unsplash.py
@@ -172,13 +172,16 @@ class UnsplashFavoriteExtractor(UnsplashExtractor):
class UnsplashCollectionExtractor(UnsplashExtractor):
"""Extractor for an unsplash collection"""
subcategory = "collection"
- pattern = BASE_PATTERN + r"/collections/(\d+)"
- test = ("https://unsplash.com/collections/3178572/winter", {
- "pattern": r"https://images\.unsplash\.com/(photo-\d+-\w+"
- r"|reserve/[^/?#]+)\?ixid=\w+&ixlib=rb-1\.2\.1$",
- "range": "1-30",
- "count": 30,
- })
+ pattern = BASE_PATTERN + r"/collections/([^/?#]+)"
+ test = (
+ ("https://unsplash.com/collections/3178572/winter", {
+ "pattern": r"https://images\.unsplash\.com/(photo-\d+-\w+"
+ r"|reserve/[^/?#]+)\?ixid=\w+&ixlib=rb-1\.2\.1$",
+ "range": "1-30",
+ "count": 30,
+ }),
+ ("https://unsplash.com/collections/_8qJQ2bCMWE/2021.05"),
+ )
def photos(self):
url = "{}/napi/collections/{}/photos".format(self.root, self.item)