aboutsummaryrefslogtreecommitdiffstats
path: root/youtube_dlc/extractor/ccma.py
diff options
context:
space:
mode:
authorpukkandan <pukkandan@gmail.com>2021-02-20 02:14:36 +0530
committerpukkandan <pukkandan@gmail.com>2021-02-20 02:32:22 +0530
commitbc2ca1bb75d586b75d83a6f60b680ee07227ff28 (patch)
treee00af2ced38c0a0c1dfead4d27f3edba9c9651e4 /youtube_dlc/extractor/ccma.py
parent5e41dca334b152d3757cff318c5f72843aeea255 (diff)
downloadhypervideo-pre-bc2ca1bb75d586b75d83a6f60b680ee07227ff28.tar.lz
hypervideo-pre-bc2ca1bb75d586b75d83a6f60b680ee07227ff28.tar.xz
hypervideo-pre-bc2ca1bb75d586b75d83a6f60b680ee07227ff28.zip
Update to ytdl-commit-cf2dbec
https://github.com/ytdl-org/youtube-dl/commit/cf2dbec6301177a1fddf72862de05fa912d9869d Except: [kakao] improve info extraction and detect geo restriction https://github.com/ytdl-org/youtube-dl/commit/d8085580f63ad3b146a31712ff76cf41d5a4558a
Diffstat (limited to 'youtube_dlc/extractor/ccma.py')
-rw-r--r--youtube_dlc/extractor/ccma.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/youtube_dlc/extractor/ccma.py b/youtube_dlc/extractor/ccma.py
index 4db51e650..e6ae49352 100644
--- a/youtube_dlc/extractor/ccma.py
+++ b/youtube_dlc/extractor/ccma.py
@@ -1,12 +1,14 @@
# coding: utf-8
from __future__ import unicode_literals
+import calendar
import datetime
import re
from .common import InfoExtractor
from ..utils import (
clean_html,
+ extract_timezone,
int_or_none,
parse_duration,
parse_resolution,
@@ -97,8 +99,9 @@ class CCMAIE(InfoExtractor):
timestamp = None
data_utc = try_get(informacio, lambda x: x['data_emissio']['utc'])
try:
- timestamp = datetime.datetime.strptime(
- data_utc, '%Y-%d-%mT%H:%M:%S%z').timestamp()
+ 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