mirror of
https://codeberg.org/polarisfm/youtube-dl
synced 2024-11-26 10:24:33 +01:00
Update bbc.py
The list of subtitles is initialised to None and may never become a list if no captions are found in the playlists.
This commit is contained in:
parent
f9588ec2cd
commit
94f4d75bf6
@ -359,8 +359,12 @@ class BBCCoUkIE(InfoExtractor):
|
||||
try:
|
||||
formatsAndSubtitles = self._download_media_selector_url(
|
||||
mediaselector_url % programme_id, programme_id)
|
||||
formats += formatsAndSubtitles[0]
|
||||
subtitles += formatsAndSubtitles[1]
|
||||
# formats should always be set, but just in case
|
||||
if formatsAndSubtitles[0]:
|
||||
formats += formatsAndSubtitles[0]
|
||||
# subtitles may never be set
|
||||
if formatsAndSubtitles[1]:
|
||||
subtitles += formatsAndSubtitles[1]
|
||||
except BBCCoUkIE.MediaSelectionError as e:
|
||||
if e.id in ('notukerror', 'geolocation', 'selectionunavailable'):
|
||||
last_exception = e
|
||||
|
Loading…
Reference in New Issue
Block a user