[imgur] treat 't/unmuted' URLs as galleries
This commit is contained in:
parent
b6cee3e45b
commit
6bcdb264e0
@ -137,7 +137,7 @@ class ImgurAlbumExtractor(ImgurExtractor):
|
||||
directory_fmt = ("{category}", "{album[id]}{album[title]:? - //}")
|
||||
filename_fmt = "{category}_{album[id]}_{num:>03}_{id}.{extension}"
|
||||
archive_fmt = "{album[id]}_{id}"
|
||||
pattern = BASE_PATTERN + r"/(?:a|t/unmuted)/(\w{7}|\w{5})"
|
||||
pattern = BASE_PATTERN + r"/a/(\w{7}|\w{5})"
|
||||
test = (
|
||||
("https://imgur.com/a/TcBmP", {
|
||||
"url": "ce3552f550a5b5316bd9c7ae02e21e39f30c0563",
|
||||
@ -199,9 +199,6 @@ class ImgurAlbumExtractor(ImgurExtractor):
|
||||
("https://imgur.com/a/RhJXhVT/all", { # 7 character album hash
|
||||
"url": "695ef0c950023362a0163ee5041796300db76674",
|
||||
}),
|
||||
("https://imgur.com/t/unmuted/YMqBcua", { # unmuted URL
|
||||
"url": "86b4747f8147cec7602f0214e267309af73a8655",
|
||||
}),
|
||||
("https://imgur.com/a/TcBmQ", {
|
||||
"exception": exception.HttpError,
|
||||
}),
|
||||
@ -232,7 +229,7 @@ class ImgurAlbumExtractor(ImgurExtractor):
|
||||
class ImgurGalleryExtractor(ImgurExtractor):
|
||||
"""Extractor for imgur galleries"""
|
||||
subcategory = "gallery"
|
||||
pattern = BASE_PATTERN + r"/gallery/(\w{7}|\w{5})"
|
||||
pattern = BASE_PATTERN + r"/(?:gallery|t/unmuted)/(\w{7}|\w{5})"
|
||||
test = (
|
||||
("https://imgur.com/gallery/zf2fIms", { # non-album gallery (#380)
|
||||
"pattern": "https://imgur.com/zf2fIms",
|
||||
@ -240,6 +237,9 @@ class ImgurGalleryExtractor(ImgurExtractor):
|
||||
("https://imgur.com/gallery/eD9CT", {
|
||||
"pattern": "https://imgur.com/a/eD9CT",
|
||||
}),
|
||||
("https://imgur.com/t/unmuted/26sEhNr", { # unmuted URL
|
||||
"pattern": "https://imgur.com/26sEhNr",
|
||||
}),
|
||||
)
|
||||
|
||||
def items(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user