mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-09-04 18:09:36 +02:00
YoutubeDL: Use its urlopen
method for downloading the thumbnail.
This commit is contained in:
parent
22ff5d2105
commit
e9c092f125
@ -918,7 +918,7 @@ def process_info(self, info_dict):
|
||||
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…
Reference in New Issue
Block a user