From 133643c36c0c767457868eef4fd156c199aee81c Mon Sep 17 00:00:00 2001 From: Abhishek Kedia Date: Mon, 21 Dec 2015 17:17:57 +0100 Subject: [PATCH] not returning list in case of single images. --- YcAQlkx.info.json | 1 - youtube_dl/extractor/imgur.py | 7 +++++-- 2 files changed, 5 insertions(+), 3 deletions(-) delete mode 100644 YcAQlkx.info.json diff --git a/YcAQlkx.info.json b/YcAQlkx.info.json deleted file mode 100644 index aa73baf56..000000000 --- a/YcAQlkx.info.json +++ /dev/null @@ -1 +0,0 @@ -{"display_id": "YcAQlkx", "extractor": "ImgurAlbum", "playlist": null, "format": "0 - unknown", "url": "http://imgur.com/YcAQlkx", "extractor_key": "ImgurAlbum", "title": "Classic Steve Carell gif...cracks me up everytime....damn the repost downvotes....", "playlist_index": null, "ext": "unknown_video", "fulltitle": "Classic Steve Carell gif...cracks me up everytime....damn the repost downvotes....", "webpage_url": "https://imgur.com/gallery/YcAQlkx", "_filename": "YcAQlkx.unknown_video", "format_id": "0", "http_headers": {"Accept-Charset": "ISO-8859-1,utf-8;q=0.7,*;q=0.7", "Accept-Language": "en-us,en;q=0.5", "Accept-Encoding": "gzip, deflate", "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:10.0) Gecko/20150101 Firefox/20.0 (Chrome)"}, "id": "YcAQlkx", "webpage_url_basename": "YcAQlkx"} \ No newline at end of file diff --git a/youtube_dl/extractor/imgur.py b/youtube_dl/extractor/imgur.py index a8d5e8c6c..bd967c4a8 100644 --- a/youtube_dl/extractor/imgur.py +++ b/youtube_dl/extractor/imgur.py @@ -112,8 +112,11 @@ class ImgurAlbumIE(InfoExtractor): 'url': 'https://imgur.com/gallery/YcAQlkx', 'info_dict': { 'id': 'YcAQlkx', + 'ext': 'mp4', + 'title': 'Classic Steve Carell gif...cracks me up everytime....damn the repost downvotes....', + 'description': 'Imgur: The most awesome images on the Internet.' + }, - 'playlist_count': 1, }] def _real_extract(self, url): @@ -123,7 +126,7 @@ class ImgurAlbumIE(InfoExtractor): 'http://imgur.com/gallery/%s/album_images/hit.json?all=true' % album_id, album_id)['data'] if len(album_img_data) == 0: - entries = [self.url_result('http://imgur.com/%s' % album_id)] + return self.url_result('http://imgur.com/%s' % album_id) else: album_images = album_img_data['images'] entries = [