1
1
mirror of https://github.com/ytdl-org/youtube-dl synced 2024-12-25 02:05:50 +01:00

[vevo] Fix timestamp handling

( / 1000 is implicit float division )
This commit is contained in:
Philipp Hagemeister 2013-10-29 14:00:01 +01:00
parent 43d7895ea0
commit 912cbf5d4e

View File

@ -58,9 +58,9 @@ class VevoIE(InfoExtractor):
'width': int(attr['frameWidth']),
})
date_epoch = int(self._search_regex(
r'/Date\((\d+)\)/', video_info['launchDate'], u'launch date'))/1000
upload_date = datetime.datetime.fromtimestamp(date_epoch)
timestamp_ms = int(self._search_regex(
r'/Date\((\d+)\)/', video_info['launchDate'], u'launch date'))
upload_date = datetime.datetime.fromtimestamp(timestamp_ms // 1000)
info = {
'id': video_id,
'title': video_info['title'],