mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-12-22 22:35:21 +00:00
Defend against non-string date value.
This commit is contained in:
parent
911e22f970
commit
cb2d26c472
@ -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 []
|
||||
|
Loading…
Reference in New Issue
Block a user