浏览代码

YoutubeDL: Use its `urlopen` method for downloading the thumbnail.

Jaime Marquínez Ferrándiz 11 年之前
父节点
当前提交
e9c092f125
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      youtube_dl/YoutubeDL.py

+ 1 - 1
youtube_dl/YoutubeDL.py

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