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:
parent
97c822b3d5
commit
5a639d17e5
@ -896,6 +896,9 @@ class YoutubeDL(object):
|
|||||||
if new_result.get('_type') == 'url':
|
if new_result.get('_type') == 'url':
|
||||||
new_result['_type'] = 'url_transparent'
|
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(
|
return self.process_ie_result(
|
||||||
new_result, download=download, extra_info=extra_info)
|
new_result, download=download, extra_info=extra_info)
|
||||||
elif result_type in ('playlist', 'multi_video'):
|
elif result_type in ('playlist', 'multi_video'):
|
||||||
|
@ -30,6 +30,7 @@ from ..utils import (
|
|||||||
smuggle_url,
|
smuggle_url,
|
||||||
unescapeHTML,
|
unescapeHTML,
|
||||||
unified_strdate,
|
unified_strdate,
|
||||||
|
unified_timestamp,
|
||||||
unsmuggle_url,
|
unsmuggle_url,
|
||||||
UnsupportedError,
|
UnsupportedError,
|
||||||
xpath_text,
|
xpath_text,
|
||||||
@ -2182,10 +2183,12 @@ class GenericIE(InfoExtractor):
|
|||||||
if not next_url:
|
if not next_url:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
pubDate = it.find('pubDate')
|
||||||
entries.append({
|
entries.append({
|
||||||
'_type': 'url_transparent',
|
'_type': 'url_transparent',
|
||||||
'url': next_url,
|
'url': next_url,
|
||||||
'title': it.find('title').text,
|
'title': it.find('title').text,
|
||||||
|
'timestamp': None if (pubDate is None) else unified_timestamp(pubDate.text),
|
||||||
})
|
})
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user