Skip to content

Commit

Permalink
[imgur] support "unmuted" URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
mikf committed May 30, 2018
1 parent 72e66f0 commit ad14de1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion gallery_dl/extractor/imgur.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ class ImgurAlbumExtractor(ImgurExtractor):
filename_fmt = "{category}_{album[hash]}_{num:>03}_{hash}.{extension}"
archive_fmt = "{album[hash]}_{hash}"
pattern = [r"(?:https?://)?(?:www\.|m\.)?imgur\.com"
r"/(?:a|gallery)/(\w{7}|\w{5})"]
r"/(?:a|gallery|t/unmuted)/(\w{7}|\w{5})"]
test = [
("https://imgur.com/a/TcBmP", {
"url": "ce3552f550a5b5316bd9c7ae02e21e39f30c0563",
Expand Down Expand Up @@ -155,6 +155,9 @@ class ImgurAlbumExtractor(ImgurExtractor):
("https://imgur.com/a/RhJXhVT/all", { # 7 character album hash
"url": "695ef0c950023362a0163ee5041796300db76674",
}),
("https://imgur.com/t/unmuted/FVyxO32", { # unmuted URL
"url": "1df12d96438ad9018ace7665dc893419ce9ec867",
}),
("https://imgur.com/a/TcBmQ", {
"exception": exception.NotFoundError,
}),
Expand Down

0 comments on commit ad14de1

Please sign in to comment.