mirror of
https://codeberg.org/polarisfm/youtube-dl
synced 2024-11-22 16:44:32 +01:00
[CCMA] Avoid exception when 'utc' is not found
This commit is contained in:
parent
8c60c29d34
commit
b4a7030620
@ -88,8 +88,11 @@ class CCMAIE(InfoExtractor):
|
||||
|
||||
# utc date is in format YYYY-DD-MM
|
||||
data_utc = informacio.get('data_emissio', {}).get('utc')
|
||||
try:
|
||||
data_iso8601 = data_utc[:5] + data_utc[8:10] + '-' + data_utc[5:7] + data_utc[10:]
|
||||
timestamp = parse_iso8601(data_iso8601)
|
||||
except TypeError:
|
||||
timestamp = None
|
||||
|
||||
subtitles = {}
|
||||
subtitols = media.get('subtitols', [])
|
||||
|
Loading…
Reference in New Issue
Block a user