mirror of
https://github.com/ytdl-org/youtube-dl
synced 2025-10-02 14:28:36 +09:00
[YouTube] Handle Web Safari formats
From yt-dlp/yt-dlp#14168, thx bashonly.
This commit is contained in:
@@ -2540,6 +2540,10 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
|||||||
if f.get('source_preference') is None:
|
if f.get('source_preference') is None:
|
||||||
f['source_preference'] = -1
|
f['source_preference'] = -1
|
||||||
|
|
||||||
|
# Deprioritize since its pre-merged m3u8 formats may have lower quality audio streams
|
||||||
|
if client_name == 'web_safari' and proto == 'hls' and not is_live:
|
||||||
|
f['source_preference'] -= 1
|
||||||
|
|
||||||
if itag in ('616', '235'):
|
if itag in ('616', '235'):
|
||||||
f['format_note'] = join_nonempty(f.get('format_note'), 'Premium', delim=' ')
|
f['format_note'] = join_nonempty(f.get('format_note'), 'Premium', delim=' ')
|
||||||
f['source_preference'] += 100
|
f['source_preference'] += 100
|
||||||
|
Reference in New Issue
Block a user