diff --git a/youtube_dl/extractor/sonyliv.py b/youtube_dl/extractor/sonyliv.py index 155074dbc..972cedb05 100644 --- a/youtube_dl/extractor/sonyliv.py +++ b/youtube_dl/extractor/sonyliv.py @@ -9,6 +9,7 @@ from ..compat import compat_HTTPError from ..utils import ( ExtractorError, int_or_none, + try_get ) @@ -98,7 +99,7 @@ class SonyLIVIE(InfoExtractor): title += ' - ' + episode subtitles = {} for subtitle in (content.get('subtitle') or []): - base_url = subtitle.get('subtitleUrl') + base_url = try_get(subtitle, lambda x: x['subtitleUrl'], compat_str) if not base_url: continue lang_code = subtitle.get('subtitleLanguageName')