From e7d22348e77367740da78a3db27167ecf894b7c9 Mon Sep 17 00:00:00 2001 From: bashonly <88596187+bashonly@users.noreply.github.com> Date: Sun, 24 Dec 2023 10:40:50 -0600 Subject: [PATCH] [ie/twitter] Prioritize m3u8 formats (#8826) Closes #8117 Authored by: bashonly --- yt_dlp/extractor/twitter.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yt_dlp/extractor/twitter.py b/yt_dlp/extractor/twitter.py index 932b478d44..5e8504aa15 100644 --- a/yt_dlp/extractor/twitter.py +++ b/yt_dlp/extractor/twitter.py @@ -1416,8 +1416,8 @@ def add_thumbnail(name, size): 'thumbnails': thumbnails, 'view_count': traverse_obj(media, ('mediaStats', 'viewCount', {int_or_none})), # No longer available 'duration': float_or_none(traverse_obj(media, ('video_info', 'duration_millis')), 1000), - # The codec of http formats are unknown - '_format_sort_fields': ('res', 'br', 'size', 'proto'), + # Prioritize m3u8 formats for compat, see https://github.com/yt-dlp/yt-dlp/issues/8117 + '_format_sort_fields': ('res', 'proto:m3u8', 'br', 'size'), # http format codec is unknown } def extract_from_card_info(card):