From df19016feb13e9a1fef3db8696be21c9476e6547 Mon Sep 17 00:00:00 2001 From: Adrian Heine Date: Tue, 26 Jan 2021 01:00:11 +0100 Subject: [PATCH] [AMP] Fix upload_date and timestamp extraction --- youtube_dl/extractor/abcnews.py | 2 ++ youtube_dl/extractor/amp.py | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/youtube_dl/extractor/abcnews.py b/youtube_dl/extractor/abcnews.py index 8b407bf9c6a..64ea6e6eda7 100644 --- a/youtube_dl/extractor/abcnews.py +++ b/youtube_dl/extractor/abcnews.py @@ -36,6 +36,8 @@ class AbcNewsVideoIE(AMPIE): 'description': 'George Stephanopoulos goes one-on-one with Iranian Foreign Minister Dr. Javad Zarif.', 'duration': 180, 'thumbnail': r're:^https?://.*\.jpg$', + 'timestamp': 1380454200, + 'upload_date': '20130929', }, 'params': { # m3u8 download diff --git a/youtube_dl/extractor/amp.py b/youtube_dl/extractor/amp.py index 7ff098cfa0c..7fc2b4b4b31 100644 --- a/youtube_dl/extractor/amp.py +++ b/youtube_dl/extractor/amp.py @@ -9,6 +9,7 @@ mimetype2ext, parse_iso8601, url_or_none, + unified_timestamp, ) @@ -88,7 +89,7 @@ def get_media_node(name, default=None): self._sort_formats(formats) - timestamp = parse_iso8601(item.get('pubDate'), ' ') or parse_iso8601(item.get('dc-date')) + timestamp = unified_timestamp(item.get('pubDate'), ' ') or parse_iso8601(item.get('dc-date')) return { 'id': video_id,