diff --git a/yt_dlp/extractor/beacon.py b/yt_dlp/extractor/beacon.py index 00bfe6ca1..97c1b26bb 100644 --- a/yt_dlp/extractor/beacon.py +++ b/yt_dlp/extractor/beacon.py @@ -77,7 +77,9 @@ def _real_extract(self, url): for track in tracks: if traverse_obj(track, 'kind') == 'captions': file = track['file'] - language = track['language'].lower() + language = traverse_obj(track, 'language') + if language is None: + language = "en" subs = {language: [{'url': file}]} self._merge_subtitles(subs, target=subtitles)