Skip to content

Commit

Permalink
[ie/twitter] Prioritize m3u8 formats (yt-dlp#8826)
Browse files Browse the repository at this point in the history
Closes yt-dlp#8117
Authored by: bashonly
  • Loading branch information
bashonly authored and aalsuwaidi committed Apr 21, 2024
1 parent 3190541 commit a61e6dc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions yt_dlp/extractor/twitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit a61e6dc

Please sign in to comment.