mirror of
https://github.com/ytdl-org/youtube-dl
synced 2024-12-23 12:40:11 +09: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
|
import re
|
||||||
|
|
||||||
from .common import InfoExtractor
|
from .common import InfoExtractor
|
||||||
|
|
||||||
|
from .compat import compat_str
|
||||||
from ..utils import (
|
from ..utils import (
|
||||||
clean_html,
|
clean_html,
|
||||||
int_or_none,
|
int_or_none,
|
||||||
@ -108,7 +110,7 @@ class CCMAIE(InfoExtractor):
|
|||||||
durada = informacio.get('durada') or {}
|
durada = informacio.get('durada') or {}
|
||||||
duration = int_or_none(durada.get('milisegons'), 1000) or parse_duration(durada.get('text'))
|
duration = int_or_none(durada.get('milisegons'), 1000) or parse_duration(durada.get('text'))
|
||||||
tematica = try_get(informacio, lambda x: x['tematica']['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 = {}
|
subtitles = {}
|
||||||
subtitols = media.get('subtitols') or []
|
subtitols = media.get('subtitols') or []
|
||||||
|
Loading…
Reference in New Issue
Block a user