mirror of
https://github.com/l1ving/youtube-dl
synced 2025-03-07 00:47:15 +08:00
I wish there was a timestamp in "OUTPUT TEMPLATE" for RSS/Atom
This commit is contained in:
parent
97c822b3d5
commit
5a639d17e5
@ -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'):
|
||||
|
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user