aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYen Chi Hsuan <yan12125@gmail.com>2016-08-05 11:44:50 +0800
committerYen Chi Hsuan <yan12125@gmail.com>2016-08-05 11:44:50 +0800
commit962250f7eaf648e998e66e1d6aa5c2b4e018cd27 (patch)
tree6e46f811bb7f9a4d087a682decc9011b631a0e92
parent7dc2a74e0ac9cfa74cc9de6f586ffd5cc8bac0d9 (diff)
[cbslocal] Fix timestamp parsing (closes #10213)
-rw-r--r--ChangeLog7
-rw-r--r--youtube_dl/extractor/cbslocal.py9
2 files changed, 9 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index f3c752e66..2d021ddf4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+version <unreleased>
+
+Fixed/improved extractors
+- [cbslocal] Fix timestamp parsing (#10213)
+
+
version 2016.08.01
Fixed/improved extractors
@@ -7,6 +13,7 @@ Fixed/improved extractors
- [safari] Relax regular expressions for URL matching (#10202)
- [cwtv] Add support for cwtvpr.com (#10196)
+
version 2016.07.30
Fixed/improved extractors
diff --git a/youtube_dl/extractor/cbslocal.py b/youtube_dl/extractor/cbslocal.py
index 74adb38a6..008c5fe32 100644
--- a/youtube_dl/extractor/cbslocal.py
+++ b/youtube_dl/extractor/cbslocal.py
@@ -1,12 +1,10 @@
# coding: utf-8
from __future__ import unicode_literals
-import calendar
-import datetime
-
from .anvato import AnvatoIE
from .sendtonews import SendtoNewsIE
from ..compat import compat_urlparse
+from ..utils import unified_timestamp
class CBSLocalIE(AnvatoIE):
@@ -71,10 +69,7 @@ class CBSLocalIE(AnvatoIE):
time_str = self._html_search_regex(
r'class="entry-date">([^<]+)<', webpage, 'released date', fatal=False)
- timestamp = None
- if time_str:
- timestamp = calendar.timegm(datetime.datetime.strptime(
- time_str, '%b %d, %Y %I:%M %p').timetuple())
+ timestamp = unified_timestamp(time_str)
info_dict.update({
'display_id': display_id,