瀏覽代碼

[vevo] Fix timestamp handling

( / 1000 is implicit float division )
Philipp Hagemeister 12 年之前
父節點
當前提交
912cbf5d4e
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      youtube_dl/extractor/vevo.py

+ 3 - 3
youtube_dl/extractor/vevo.py

@@ -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'],