1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-11-05 17:15:13 +00:00

[ie/youtube] Extract media_type for all videos (#13136)

Authored by: bashonly
This commit is contained in:
bashonly
2025-05-10 17:33:57 -05:00
committed by GitHub
parent ea8498ed53
commit ded11ebc9a
3 changed files with 36 additions and 5 deletions

View File

@@ -37,6 +37,7 @@ class YoutubeClipIE(YoutubeTabBaseInfoExtractor):
'chapters': 'count:20',
'comment_count': int,
'heatmap': 'count:100',
'media_type': 'clip',
},
}]
@@ -59,6 +60,7 @@ class YoutubeClipIE(YoutubeTabBaseInfoExtractor):
'url': f'https://www.youtube.com/watch?v={video_id}',
'ie_key': YoutubeIE.ie_key(),
'id': clip_id,
'media_type': 'clip',
'section_start': int(clip_data['startTimeMs']) / 1000,
'section_end': int(clip_data['endTimeMs']) / 1000,
'_format_sort_fields': ( # https protocol is prioritized for ffmpeg compatibility