diff options
author | pukkandan <pukkandan.ytdlp@gmail.com> | 2021-07-12 06:07:23 +0530 |
---|---|---|
committer | pukkandan <pukkandan.ytdlp@gmail.com> | 2021-07-12 06:07:23 +0530 |
commit | f0ff9979c62ec043c5ef8570ae2932aaa2f565b8 (patch) | |
tree | c13508d312d341a9bd722ad5ea7bdb3efc4d7b70 | |
parent | 501dd1ad55c141020c0c3b922facbca30b6584a9 (diff) | |
download | hypervideo-pre-f0ff9979c62ec043c5ef8570ae2932aaa2f565b8.tar.lz hypervideo-pre-f0ff9979c62ec043c5ef8570ae2932aaa2f565b8.tar.xz hypervideo-pre-f0ff9979c62ec043c5ef8570ae2932aaa2f565b8.zip |
[vlive] Extract thumbnail directly in addition to the one from Naver
Closes #477
-rw-r--r-- | yt_dlp/extractor/vlive.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/yt_dlp/extractor/vlive.py b/yt_dlp/extractor/vlive.py index 9cfa082db..84f51a544 100644 --- a/yt_dlp/extractor/vlive.py +++ b/yt_dlp/extractor/vlive.py @@ -178,9 +178,15 @@ class VLiveIE(VLiveBaseIE): if video_type == 'VOD': inkey = self._call_api('video/v1.0/vod/%s/inkey', video_id)['inkey'] vod_id = video['vodId'] - return merge_dicts( + info_dict = merge_dicts( get_common_fields(), self._extract_video_info(video_id, vod_id, inkey)) + thumbnail = video.get('thumb') + if thumbnail: + if not info_dict.get('thumbnails') and info_dict.get('thumbnail'): + info_dict['thumbnails'] = [{'url': info_dict.pop('thumbnail')}] + info_dict.setdefault('thumbnails', []).append({'url': thumbnail, 'preference': 1}) + return info_dict elif video_type == 'LIVE': status = video.get('status') if status == 'ON_AIR': |