From 68b340e19b2978cc04b089a427b52ca1b1a93990 Mon Sep 17 00:00:00 2001 From: Mort Yao Date: Fri, 18 Mar 2016 03:13:01 +0100 Subject: [PATCH] [imgur] fix for album links Example: - http://imgur.com/a/6CrHX --- src/you_get/extractors/imgur.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/you_get/extractors/imgur.py b/src/you_get/extractors/imgur.py index 20848a87..b7bdc4c5 100644 --- a/src/you_get/extractors/imgur.py +++ b/src/you_get/extractors/imgur.py @@ -16,7 +16,9 @@ class Imgur(VideoExtractor): if re.search(r'imgur\.com/a/', self.url): # album content = get_content(self.url) - album = json.loads(match1(content, r'album\s*:\s*({.*}),')) + album = match1(content, r'album\s*:\s*({.*}),') or \ + match1(content, r'image\s*:\s*({.*}),') + album = json.loads(album) count = album['album_images']['count'] images = album['album_images']['images'] ext = images[0]['ext']