From cb2d26c472cc5afac2198b53168086a9e2778f5b Mon Sep 17 00:00:00 2001 From: dirkf Date: Mon, 31 Oct 2022 13:39:55 +0000 Subject: [PATCH] Defend against non-string date value. --- youtube_dl/extractor/ccma.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/youtube_dl/extractor/ccma.py b/youtube_dl/extractor/ccma.py index 7533f96e7..0dd0bd1cb 100644 --- a/youtube_dl/extractor/ccma.py +++ b/youtube_dl/extractor/ccma.py @@ -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 []