mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-30 04:10:23 +00:00
[extractor/common] Extract images from SMIL
This commit is contained in:
parent
e7d8e98a9f
commit
1e5bcdec02
@ -1054,10 +1054,18 @@ def _parse_smil(self, smil, smil_url, video_id, f4m_params=None):
|
|||||||
elif not description and name in ('description', 'abstract'):
|
elif not description and name in ('description', 'abstract'):
|
||||||
description = content
|
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 {
|
return {
|
||||||
'id': video_id,
|
'id': video_id,
|
||||||
'title': title or video_id,
|
'title': title or video_id,
|
||||||
'description': description,
|
'description': description,
|
||||||
|
'thumbnails': thumbnails,
|
||||||
'formats': formats,
|
'formats': formats,
|
||||||
'subtitles': subtitles,
|
'subtitles': subtitles,
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user