aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--yt_dlp/YoutubeDL.py2
-rw-r--r--yt_dlp/extractor/youtube.py4
2 files changed, 4 insertions, 2 deletions
diff --git a/yt_dlp/YoutubeDL.py b/yt_dlp/YoutubeDL.py
index 41cf4265d..27d94b63a 100644
--- a/yt_dlp/YoutubeDL.py
+++ b/yt_dlp/YoutubeDL.py
@@ -3084,7 +3084,7 @@ class YoutubeDL(object):
'Available %s for %s:' % (name, video_id))
def _row(lang, formats):
- exts, names = zip(*((f['ext'], f.get('name', 'unknown')) for f in reversed(formats)))
+ exts, names = zip(*((f['ext'], f.get('name') or 'unknown') for f in reversed(formats)))
if len(set(names)) == 1:
names = [] if names[0] == 'unknown' else names[:1]
return [lang, ', '.join(names), ', '.join(exts)]
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