[cnn] Improve thumbnail extraction
This commit is contained in:
parent
d551980823
commit
be6d722904
2 changed files with 8 additions and 4 deletions
|
@ -719,6 +719,8 @@ class YoutubeDL(object):
|
|||
|
||||
thumbnails = info_dict.get('thumbnails')
|
||||
if thumbnails:
|
||||
thumbnails.sort(key=lambda t: (
|
||||
t.get('width'), t.get('height'), t.get('url')))
|
||||
for t in thumbnails:
|
||||
if 'width' in t and 'height' in t:
|
||||
t['resolution'] = '%dx%d' % (t['width'], t['height'])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue