[extractor/common] Extract images from SMIL
This commit is contained in:
parent
e7d8e98a9f
commit
1e5bcdec02
1 changed files with 8 additions and 0 deletions
|
@ -1054,10 +1054,18 @@ class InfoExtractor(object):
|
|||
elif not description and name in ('description', 'abstract'):
|
||||
description = content
|
||||
|
||||
thumbnails = [{
|
||||
'id': image.get('type'),
|
||||
'url': image.get('src'),
|
||||
'width': int_or_none(image.get('width')),
|
||||
'height': int_or_none(image.get('height')),
|
||||
} for image in smil.findall(self._xpath_ns('.//image', namespace)) if image.get('src')]
|
||||
|
||||
return {
|
||||
'id': video_id,
|
||||
'title': title or video_id,
|
||||
'description': description,
|
||||
'thumbnails': thumbnails,
|
||||
'formats': formats,
|
||||
'subtitles': subtitles,
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue