Try all possible mediaselectors even if one succeeds
Simplify and correct
This commit is contained in:
parent
0bef1c757b
commit
be50054bb6
@ -350,6 +350,8 @@ class BBCCoUkIE(InfoExtractor):
|
||||
|
||||
def _download_media_selector(self, programme_id):
|
||||
last_exception = None
|
||||
formats = []
|
||||
subtitles = None
|
||||
for mediaselector_url in self._MEDIASELECTOR_URLS:
|
||||
try:
|
||||
formatsAndSubtitles = self._download_media_selector_url(
|
||||
@ -359,12 +361,10 @@ class BBCCoUkIE(InfoExtractor):
|
||||
formats += formatsAndSubtitles[0]
|
||||
# subtitles (dict {lang,sttl})
|
||||
if formatsAndSubtitles[1]:
|
||||
if not subtitles:
|
||||
subtitles = formatsAndSubtitles[1]
|
||||
else:
|
||||
if subtitles:
|
||||
# prioritise the first sttl for each lang
|
||||
formatsAndSubtitles[1].update(subtitles)
|
||||
subtitles = formatsAndSubtitles[1]
|
||||
subtitles = formatsAndSubtitles[1]
|
||||
except BBCCoUkIE.MediaSelectionError as e:
|
||||
if e.id in ('notukerror', 'geolocation', 'selectionunavailable'):
|
||||
last_exception = e
|
||||
|
Loading…
x
Reference in New Issue
Block a user