Skip to content

A feature-rich command-line audio/video downloader

[ie/youtube] Use impersonation for downloading subtitles (#13786)

bashonly8820101aa315
diff --git a/yt_dlp/extractor/youtube/_video.py b/yt_dlp/extractor/youtube/_video.py
index fc1f087ace..5968edc60e 100644
--- a/yt_dlp/extractor/youtube/_video.py
+++ b/yt_dlp/extractor/youtube/_video.py
@@ -4056,6 +4056,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
'ext': fmt,
'url': urljoin('https://www.youtube.com', update_url_query(base_url, query)),
'name': sub_name,
+ 'impersonate': True,
STREAMING_DATA_CLIENT_NAME: client_name,
})