aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/amp.py
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2016-03-28 01:13:47 +0600
committerSergey M․ <dstftw@gmail.com>2016-03-28 01:13:47 +0600
commit87d105ac6c90b4dad519de7d013623923d74d570 (patch)
tree534e51dfa3d0c217549d29d15e96bd1e251fca71 /youtube_dl/extractor/amp.py
parent3454139576ad98b62162ba0a9bca4b342c5d07ce (diff)
[amp] Fix upload timestamp extraction (Closes #9007)
Diffstat (limited to 'youtube_dl/extractor/amp.py')
-rw-r--r--youtube_dl/extractor/amp.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/youtube_dl/extractor/amp.py b/youtube_dl/extractor/amp.py
index 69e6baff7..138fa0808 100644
--- a/youtube_dl/extractor/amp.py
+++ b/youtube_dl/extractor/amp.py
@@ -69,12 +69,14 @@ class AMPIE(InfoExtractor):
self._sort_formats(formats)
+ timestamp = parse_iso8601(item.get('pubDate'), ' ') or parse_iso8601(item.get('dc-date'))
+
return {
'id': video_id,
'title': get_media_node('title'),
'description': get_media_node('description'),
'thumbnails': thumbnails,
- 'timestamp': parse_iso8601(item.get('pubDate'), ' '),
+ 'timestamp': timestamp,
'duration': int_or_none(media_content[0].get('@attributes', {}).get('duration')),
'subtitles': subtitles,
'formats': formats,