aboutsummaryrefslogtreecommitdiffstats
path: root/yt_dlp
diff options
context:
space:
mode:
authornixxo <nixxo@protonmail.com>2022-01-01 20:50:27 +0100
committerGitHub <noreply@github.com>2022-01-02 01:20:27 +0530
commit7592749cbe377675688dfcad5b7c1d46bbb684e1 (patch)
treee35110d845c027a884216c4dabfa93c4dfc3ce7f /yt_dlp
parent767f999b53705cdeda1b5bcca360aa1fc9c88135 (diff)
downloadhypervideo-pre-7592749cbe377675688dfcad5b7c1d46bbb684e1.tar.lz
hypervideo-pre-7592749cbe377675688dfcad5b7c1d46bbb684e1.tar.xz
hypervideo-pre-7592749cbe377675688dfcad5b7c1d46bbb684e1.zip
[extractor] Extract thumbnails from JSON-LD (#2195)
Authored by: nixxo
Diffstat (limited to 'yt_dlp')
-rw-r--r--yt_dlp/extractor/common.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/yt_dlp/extractor/common.py b/yt_dlp/extractor/common.py
index 3821b7183..1d694293e 100644
--- a/yt_dlp/extractor/common.py
+++ b/yt_dlp/extractor/common.py
@@ -1436,7 +1436,8 @@ class InfoExtractor(object):
'url': url_or_none(e.get('contentUrl')),
'title': unescapeHTML(e.get('name')),
'description': unescapeHTML(e.get('description')),
- 'thumbnail': url_or_none(e.get('thumbnailUrl') or e.get('thumbnailURL')),
+ 'thumbnails': [{'url': url_or_none(url)}
+ for url in variadic(traverse_obj(e, 'thumbnailUrl', 'thumbnailURL'))],
'duration': parse_duration(e.get('duration')),
'timestamp': unified_timestamp(e.get('uploadDate')),
# author can be an instance of 'Organization' or 'Person' types.