Browse Source

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

totalwebcasting
Jaime Marquínez Ferrándiz 11 years ago
parent
commit
e9c092f125
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      youtube_dl/YoutubeDL.py

+ 1
- 1
youtube_dl/YoutubeDL.py View 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' %


Loading…
Cancel
Save