]> git.bitcoin.ninja Git - youtube-dl/commitdiff
YoutubeDL: Use its `urlopen` method for downloading the thumbnail.
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Fri, 7 Mar 2014 15:43:34 +0000 (16:43 +0100)
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Fri, 7 Mar 2014 15:43:34 +0000 (16:43 +0100)
youtube_dl/YoutubeDL.py

index 62ccad20c55b891e76580a4ed9aed0ef34078d1e..6fd0969b5ddcfaa16fa3ca09268faad0bc6e2e72 100644 (file)
@@ -918,7 +918,7 @@ class YoutubeDL(object):
                     self.to_screen('[%s] %s: Downloading thumbnail ...' %
                                    (info_dict['extractor'], info_dict['id']))
                     try:
-                        uf = compat_urllib_request.urlopen(info_dict['thumbnail'])
+                        uf = self.urlopen(info_dict['thumbnail'])
                         with open(thumb_filename, 'wb') as thumbf:
                             shutil.copyfileobj(uf, thumbf)
                         self.to_screen('[%s] %s: Writing thumbnail to: %s' %