[imgur] fix for direct images

This commit is contained in:
Mort Yao 2016-03-16 20:36:02 +01:00
parent 73eb64431a
commit 318b74827d
2 changed files with 10 additions and 6 deletions

View File

@ -33,7 +33,7 @@ class VideoExtractor():
def download_by_url(self, url, **kwargs): def download_by_url(self, url, **kwargs):
self.url = url self.url = url
self.vid= None self.vid = None
if 'extractor_proxy' in kwargs and kwargs['extractor_proxy']: if 'extractor_proxy' in kwargs and kwargs['extractor_proxy']:
set_proxy(parse_host(kwargs['extractor_proxy'])) set_proxy(parse_host(kwargs['extractor_proxy']))

View File

@ -37,11 +37,15 @@ class Imgur(VideoExtractor):
elif re.search(r'i\.imgur\.com/', self.url): elif re.search(r'i\.imgur\.com/', self.url):
# direct image # direct image
universal_download(self.url, _, container, size = url_info(self.url)
output_dir=kwargs['output_dir'], self.streams = {
merge=kwargs['merge'], 'original': {
info_only=kwargs['info_only']) 'src': [self.url],
exit(0) # FIXME! 'size': size,
'container': container
}
}
self.title = r1(r'i\.imgur\.com/([^./]*)', self.url)
else: else:
# gallery image # gallery image