1
0
mirror of https://github.com/l1ving/youtube-dl synced 2025-03-07 04:27:16 +08:00

I wish there was a timestamp in "OUTPUT TEMPLATE" for RSS/Atom

This commit is contained in:
Vytautas Jakutis 2020-02-22 20:16:33 +02:00
parent 97c822b3d5
commit 5a639d17e5
2 changed files with 6 additions and 0 deletions

View File

@ -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'):

View File

@ -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 {