A feature-rich command-line audio/video downloader
[ie/youtube] Use Safari UA for web_embedded client (#17684)
gamer191c7fb478d21e9
diff --git a/yt_dlp/extractor/youtube/_base.py b/yt_dlp/extractor/youtube/_base.pyindex c68996eeca..e575ce9562 100644--- a/yt_dlp/extractor/youtube/_base.py+++ b/yt_dlp/extractor/youtube/_base.py@@ -125,6 +125,7 @@ INNERTUBE_CLIENTS = {'client': {'clientName': 'WEB_EMBEDDED_PLAYER','clientVersion': '2.20260708.00.00',+ 'userAgent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.5 Safari/605.1.15,gzip(gfe)',},},'INNERTUBE_CONTEXT_CLIENT_NAME': 56,diff --git a/yt_dlp/extractor/youtube/_video.py b/yt_dlp/extractor/youtube/_video.pyindex 290c3e4bde..3f9ebe0e71 100644--- a/yt_dlp/extractor/youtube/_video.py+++ b/yt_dlp/extractor/youtube/_video.py@@ -3640,7 +3640,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor):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 live_status != 'is_live':+ if client_name in ('web_safari', 'web_embedded') and proto == 'hls' and live_status != 'is_live':f['source_preference'] -= 1if missing_pot: