aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2014-03-13 18:21:55 +0100
committerPhilipp Hagemeister <phihag@phihag.de>2014-03-13 18:45:14 +0100
commit955c451456e5268e8596da79d1fcf48df2af7a55 (patch)
treed1ca5adfd9f5540b748aa57eef57d63ab34e522e /youtube_dl
parente5de3f6c89d2432a3afbc6d0545259ad49ee17a9 (diff)
downloadyoutube-dl-955c451456e5268e8596da79d1fcf48df2af7a55.tar.xz
Rename upload_timestamp to timestamp
Diffstat (limited to 'youtube_dl')
-rw-r--r--youtube_dl/YoutubeDL.py4
-rw-r--r--youtube_dl/extractor/common.py4
-rw-r--r--youtube_dl/extractor/vevo.py6
3 files changed, 8 insertions, 6 deletions
diff --git a/youtube_dl/YoutubeDL.py b/youtube_dl/YoutubeDL.py
index d9f83419e..a4214de78 100644
--- a/youtube_dl/YoutubeDL.py
+++ b/youtube_dl/YoutubeDL.py
@@ -689,9 +689,9 @@ class YoutubeDL(object):
if 'display_id' not in info_dict and 'id' in info_dict:
info_dict['display_id'] = info_dict['id']
- if info_dict.get('upload_date') is None and info_dict.get('upload_timestamp') is not None:
+ if info_dict.get('upload_date') is None and info_dict.get('timestamp') is not None:
upload_date = datetime.datetime.utcfromtimestamp(
- info_dict['upload_timestamp'])
+ info_dict['timestamp'])
info_dict['upload_date'] = upload_date.strftime('%Y%m%d')
# This extractors handle format selection themselves
diff --git a/youtube_dl/extractor/common.py b/youtube_dl/extractor/common.py
index 103528414..647720c8a 100644
--- a/youtube_dl/extractor/common.py
+++ b/youtube_dl/extractor/common.py
@@ -97,9 +97,9 @@ class InfoExtractor(object):
thumbnail: Full URL to a video thumbnail image.
description: One-line video description.
uploader: Full name of the video uploader.
- upload_timestamp:UNIX timestamp of the upload moment.
+ timestamp: UNIX timestamp of the moment the video became available.
upload_date: Video upload date (YYYYMMDD).
- If not explicitly set, calculated from update_timestamp.
+ If not explicitly set, calculated from timestamp.
uploader_id: Nickname or id of the video uploader.
location: Physical location of the video.
subtitles: The subtitle file contents as a dictionary in the format
diff --git a/youtube_dl/extractor/vevo.py b/youtube_dl/extractor/vevo.py
index 7c97b9b36..8f4db59d4 100644
--- a/youtube_dl/extractor/vevo.py
+++ b/youtube_dl/extractor/vevo.py
@@ -33,6 +33,7 @@ class VevoIE(InfoExtractor):
"duration": 230.12,
"width": 1920,
"height": 1080,
+ 'timestamp': 1372057200,
}
}, {
'note': 'v3 SMIL format',
@@ -46,6 +47,7 @@ class VevoIE(InfoExtractor):
'title': 'I Wish I Could Break Your Heart',
'duration': 226.101,
'age_limit': 0,
+ 'timestamp': 1392796919,
}
}, {
'note': 'Age-limited video',
@@ -57,7 +59,7 @@ class VevoIE(InfoExtractor):
'title': 'Tunnel Vision (Explicit)',
'uploader': 'Justin Timberlake',
'upload_date': '20130704',
- 'upload_timestamp': 1372906800,
+ 'timestamp': 1372906800,
},
'params': {
'skip_download': 'true',
@@ -175,7 +177,7 @@ class VevoIE(InfoExtractor):
'title': video_info['title'],
'formats': formats,
'thumbnail': video_info['imageUrl'],
- 'upload_timestamp': timestamp_ms // 1000,
+ 'timestamp': timestamp_ms // 1000,
'uploader': video_info['mainArtists'][0]['artistName'],
'duration': video_info['duration'],
'age_limit': age_limit,