Skip to content

Commit

Permalink
[AMP] Fix upload_date and timestamp extraction
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianheine committed Jan 26, 2021
1 parent 0f7d413 commit df19016
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions youtube_dl/extractor/abcnews.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion youtube_dl/extractor/amp.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
mimetype2ext,
parse_iso8601,
url_or_none,
unified_timestamp,
)


Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit df19016

Please sign in to comment.