diff options
author | Jesús <heckyel@hyperbola.info> | 2022-03-12 06:05:22 +0800 |
---|---|---|
committer | Jesús <heckyel@hyperbola.info> | 2022-03-12 06:05:22 +0800 |
commit | b9775db0f6c1013c76bd34784a92943c1c099e17 (patch) | |
tree | 578123ef504e260d59b3490eab648f7e20348f94 /yt_dlp/extractor/ccma.py | |
parent | 4dca2c43485c9aebf8437e0dae86668a0b969b20 (diff) | |
parent | 592b748582f67309ac79670ba6a4bb7a62c4506f (diff) | |
download | hypervideo-pre-b9775db0f6c1013c76bd34784a92943c1c099e17.tar.lz hypervideo-pre-b9775db0f6c1013c76bd34784a92943c1c099e17.tar.xz hypervideo-pre-b9775db0f6c1013c76bd34784a92943c1c099e17.zip |
updated from upstream | 12/03/2022 at 06:05
Diffstat (limited to 'yt_dlp/extractor/ccma.py')
-rw-r--r-- | yt_dlp/extractor/ccma.py | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/yt_dlp/extractor/ccma.py b/yt_dlp/extractor/ccma.py index ea98f8688..9dbaabfa0 100644 --- a/yt_dlp/extractor/ccma.py +++ b/yt_dlp/extractor/ccma.py @@ -1,17 +1,14 @@ # coding: utf-8 from __future__ import unicode_literals -import calendar -import datetime - from .common import InfoExtractor from ..utils import ( clean_html, - extract_timezone, int_or_none, parse_duration, parse_resolution, try_get, + unified_timestamp, url_or_none, ) @@ -95,14 +92,8 @@ class CCMAIE(InfoExtractor): duration = int_or_none(durada.get('milisegons'), 1000) or parse_duration(durada.get('text')) tematica = try_get(informacio, lambda x: x['tematica']['text']) - timestamp = None data_utc = try_get(informacio, lambda x: x['data_emissio']['utc']) - try: - timezone, data_utc = extract_timezone(data_utc) - timestamp = calendar.timegm((datetime.datetime.strptime( - data_utc, '%Y-%d-%mT%H:%M:%S') - timezone).timetuple()) - except TypeError: - pass + timestamp = unified_timestamp(data_utc) subtitles = {} subtitols = media.get('subtitols') or [] |