1
0
Fork 0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-05-19 19:49:33 +00:00

Defend against non-string date value.

This commit is contained in:
dirkf 2022-10-31 13:39:55 +00:00 committed by GitHub
parent 911e22f970
commit cb2d26c472
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4,6 +4,8 @@ from __future__ import unicode_literals
import re
from .common import InfoExtractor
from .compat import compat_str
from ..utils import (
clean_html,
int_or_none,
@ -108,7 +110,7 @@ class CCMAIE(InfoExtractor):
durada = informacio.get('durada') or {}
duration = int_or_none(durada.get('milisegons'), 1000) or parse_duration(durada.get('text'))
tematica = try_get(informacio, lambda x: x['tematica']['text'])
timestamp = parse_iso8601(try_get(informacio, lambda x: x['data_emissio']['utc']))
timestamp = parse_iso8601(try_get(informacio, lambda x: x['data_emissio']['utc']), compat_str)
subtitles = {}
subtitols = media.get('subtitols') or []