From 2872ea449409331487960ea71c6ba0665cf0b831 Mon Sep 17 00:00:00 2001 From: David Pedersen Date: Thu, 11 Jul 2019 13:15:37 +0200 Subject: [PATCH] Get sub_paths with a loop --- youtube_dl/extractor/tvplay.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/youtube_dl/extractor/tvplay.py b/youtube_dl/extractor/tvplay.py index c3ccda2ab..68828aa86 100644 --- a/youtube_dl/extractor/tvplay.py +++ b/youtube_dl/extractor/tvplay.py @@ -312,11 +312,7 @@ class TVPlayIE(InfoExtractor): # TODO: webvtt in m3u8 subtitles = {} - sub_paths = [ - video.get('sami_path'), - video.get('subtitles_webvtt'), - video.get('subtitles_for_hearing_impaired'), - ] + sub_paths = [video.get(key) for key in ['sami_path', 'subtitles_webvtt', 'subtitles_for_hearing_impaired']] for path in sub_paths: if path: lang = self._search_regex(