projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e7d8e98
)
[extractor/common] Extract images from SMIL
author
Sergey M․
<dstftw@gmail.com>
Thu, 1 Oct 2015 16:08:16 +0000
(22:08 +0600)
committer
Sergey M․
<dstftw@gmail.com>
Thu, 1 Oct 2015 16:20:21 +0000
(22:20 +0600)
youtube_dl/extractor/common.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/common.py
b/youtube_dl/extractor/common.py
index 9c40d56a9d71a3e2c1754e93d1052e93ba98532f..5684227dcfca770be68d1feea28616a5e0d84e57 100644
(file)
--- 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
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,
return {
'id': video_id,
'title': title or video_id,
'description': description,
+ 'thumbnails': thumbnails,
'formats': formats,
'subtitles': subtitles,
}
'formats': formats,
'subtitles': subtitles,
}