From 174b7954858fcad19eb647507a79699d2f69da5e Mon Sep 17 00:00:00 2001 From: Aniruddh Joshi Date: Fri, 15 Oct 2021 10:02:17 +0530 Subject: [PATCH] Proposed changes --- youtube_dl/extractor/sonyliv.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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')