projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3454139
)
[amp] Fix upload timestamp extraction (Closes #9007)
author
Sergey M․
<dstftw@gmail.com>
Sun, 27 Mar 2016 19:13:47 +0000
(
01:13
+0600)
committer
Sergey M․
<dstftw@gmail.com>
Sun, 27 Mar 2016 19:13:47 +0000
(
01:13
+0600)
youtube_dl/extractor/amp.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/amp.py
b/youtube_dl/extractor/amp.py
index 69e6baff7fd4cb6c948ad1826df3a5bc9342f569..138fa08086ee2d4e7c446c09ce85b8726e4ff255 100644
(file)
--- a/
youtube_dl/extractor/amp.py
+++ b/
youtube_dl/extractor/amp.py
@@
-69,12
+69,14
@@
class AMPIE(InfoExtractor):
self._sort_formats(formats)
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,
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,
'duration': int_or_none(media_content[0].get('@attributes', {}).get('duration')),
'subtitles': subtitles,
'formats': formats,