Proposed changes

This commit is contained in:
Aniruddh Joshi 2021-10-15 10:02:17 +05:30 committed by GitHub
parent 30d8bbf6fa
commit 174b795485
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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')