]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/extractor/vlive.py
[youtube] Add `mobile_web` client (#557)
[yt-dlp.git] / yt_dlp / extractor / vlive.py
index 9cfa082db0acf9cdbce96ae4527c08c4ea4f5ef0..84f51a544c11aa2cffdb0b683bf48dd284be407d 100644 (file)
@@ -178,9 +178,15 @@ def get_common_fields():
         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':