aboutsummaryrefslogtreecommitdiffstats
path: root/yt_dlp/extractor/youtube.py
diff options
context:
space:
mode:
authorpukkandan <pukkandan.ytdlp@gmail.com>2021-06-25 23:10:31 +0530
committerpukkandan <pukkandan.ytdlp@gmail.com>2021-06-25 23:10:31 +0530
commit49c258e18deadee9db559aa8df1e947d72ba1557 (patch)
tree8c55661810adf406870313a89879631d1fc5812c /yt_dlp/extractor/youtube.py
parentd3f62c19676bac32d5fcd10791820b9e3d615804 (diff)
downloadhypervideo-pre-49c258e18deadee9db559aa8df1e947d72ba1557.tar.lz
hypervideo-pre-49c258e18deadee9db559aa8df1e947d72ba1557.tar.xz
hypervideo-pre-49c258e18deadee9db559aa8df1e947d72ba1557.zip
[youtube] Fix subtitle names for age-gated videos
Related: https://github.com/iv-org/invidious/pull/2205#issuecomment-868680486
Diffstat (limited to 'yt_dlp/extractor/youtube.py')
-rw-r--r--yt_dlp/extractor/youtube.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/yt_dlp/extractor/youtube.py b/yt_dlp/extractor/youtube.py
index 2c4e9b657..e27253e37 100644
--- a/yt_dlp/extractor/youtube.py
+++ b/yt_dlp/extractor/youtube.py
@@ -2307,7 +2307,9 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
continue
process_language(
automatic_captions, base_url, translation_language_code,
- try_get(translation_language, lambda x: x['languageName']['simpleText']),
+ try_get(translation_language, (
+ lambda x: x['languageName']['simpleText'],
+ lambda x: x['languageName']['runs'][0]['text'])),
{'tlang': translation_language_code})
info['automatic_captions'] = automatic_captions
info['subtitles'] = subtitles