mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-06-06 13:28:59 +02:00
pull out common thumbnail info
This commit is contained in:
parent
24e83cf661
commit
eecd76dd92
|
@ -56,13 +56,14 @@ def _real_extract(self, url):
|
|||
|
||||
thumbnails = []
|
||||
for image_info in traverse_obj(note_info, ('imageList', ...)):
|
||||
thumbnail_info = traverse_obj(image_info, {
|
||||
'height': 'height',
|
||||
'width': 'width'
|
||||
})
|
||||
for url in traverse_obj(image_info, (('urlDefault', 'urlPre'), {url_or_none})):
|
||||
thumbnails.append({
|
||||
'url': url,
|
||||
**traverse_obj(image_info, {
|
||||
'height': 'height',
|
||||
'width': 'width'
|
||||
})
|
||||
**thumbnail_info
|
||||
})
|
||||
|
||||
return {
|
||||
|
|
Loading…
Reference in New Issue
Block a user