From 1e5bcdec0264190ed2a05ee49c1f9f5b20ba3aa6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sergey=20M=E2=80=A4?= Date: Thu, 1 Oct 2015 22:08:16 +0600 Subject: [PATCH] [extractor/common] Extract images from SMIL --- youtube_dl/extractor/common.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/youtube_dl/extractor/common.py b/youtube_dl/extractor/common.py index 9c40d56a9..5684227dc 100644 --- a/youtube_dl/extractor/common.py +++ b/youtube_dl/extractor/common.py @@ -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, } -- 2.22.2