aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/vevo.py
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2014-03-13 15:30:25 +0100
committerPhilipp Hagemeister <phihag@phihag.de>2014-03-13 15:30:25 +0100
commit9d2ecdbc712d4e500dd0207041392b143082ad00 (patch)
tree6dbd0bcf850d94ee622aeb53507f7ffbea55f0df /youtube_dl/extractor/vevo.py
parent9b69af5342818bf78c44cf205dc036a84c128e8c (diff)
[vevo] Centralize timestamp handling
Diffstat (limited to 'youtube_dl/extractor/vevo.py')
-rw-r--r--youtube_dl/extractor/vevo.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/youtube_dl/extractor/vevo.py b/youtube_dl/extractor/vevo.py
index 888eb7402..7c97b9b36 100644
--- a/youtube_dl/extractor/vevo.py
+++ b/youtube_dl/extractor/vevo.py
@@ -2,7 +2,6 @@ from __future__ import unicode_literals
import re
import xml.etree.ElementTree
-import datetime
from .common import InfoExtractor
from ..utils import (
@@ -57,7 +56,8 @@ class VevoIE(InfoExtractor):
'age_limit': 18,
'title': 'Tunnel Vision (Explicit)',
'uploader': 'Justin Timberlake',
- 'upload_date': '20130703',
+ 'upload_date': '20130704',
+ 'upload_timestamp': 1372906800,
},
'params': {
'skip_download': 'true',
@@ -169,13 +169,13 @@ class VevoIE(InfoExtractor):
timestamp_ms = int(self._search_regex(
r'/Date\((\d+)\)/', video_info['launchDate'], 'launch date'))
- upload_date = datetime.datetime.utcfromtimestamp(timestamp_ms // 1000)
+
return {
'id': video_id,
'title': video_info['title'],
'formats': formats,
'thumbnail': video_info['imageUrl'],
- 'upload_date': upload_date.strftime('%Y%m%d'),
+ 'upload_timestamp': timestamp_ms // 1000,
'uploader': video_info['mainArtists'][0]['artistName'],
'duration': video_info['duration'],
'age_limit': age_limit,