diff --git a/youtube_dl/YoutubeDL.py b/youtube_dl/YoutubeDL.py index b09cb0a79..304303f1b 100755 --- a/youtube_dl/YoutubeDL.py +++ b/youtube_dl/YoutubeDL.py @@ -896,6 +896,9 @@ class YoutubeDL(object): if new_result.get('_type') == 'url': new_result['_type'] = 'url_transparent' + if ie_result.get('timestamp') is not None: + extra_info['timestamp'] = ie_result.get('timestamp') + return self.process_ie_result( new_result, download=download, extra_info=extra_info) elif result_type in ('playlist', 'multi_video'): diff --git a/youtube_dl/extractor/generic.py b/youtube_dl/extractor/generic.py index 3c002472f..58906bb02 100644 --- a/youtube_dl/extractor/generic.py +++ b/youtube_dl/extractor/generic.py @@ -30,6 +30,7 @@ from ..utils import ( smuggle_url, unescapeHTML, unified_strdate, + unified_timestamp, unsmuggle_url, UnsupportedError, xpath_text, @@ -2182,10 +2183,12 @@ class GenericIE(InfoExtractor): if not next_url: continue + pubDate = it.find('pubDate') entries.append({ '_type': 'url_transparent', 'url': next_url, 'title': it.find('title').text, + 'timestamp': None if (pubDate is None) else unified_timestamp(pubDate.text), }) return {