forked from indymedia/epicyon
Add publication date to rss
parent
39dbcc052a
commit
6090fac39f
3
blog.py
3
blog.py
|
@ -260,10 +260,13 @@ def htmlBlogPostRSS(authorized: bool, \
|
||||||
if not restrictToDomain or \
|
if not restrictToDomain or \
|
||||||
(restrictToDomain and '/'+domain in messageLink):
|
(restrictToDomain and '/'+domain in messageLink):
|
||||||
if postJsonObject['object'].get('summary'):
|
if postJsonObject['object'].get('summary'):
|
||||||
|
published=postJsonObject['object']['published']
|
||||||
|
pubDate=datetime.strptime(published,"%Y-%m-%dT%H:%M:%SZ")
|
||||||
titleStr=postJsonObject['object']['summary']
|
titleStr=postJsonObject['object']['summary']
|
||||||
rssStr= ' <item>'
|
rssStr= ' <item>'
|
||||||
rssStr+=' <title>'+titleStr+'</title>'
|
rssStr+=' <title>'+titleStr+'</title>'
|
||||||
rssStr+=' <link>'+messageLink+'</link>'
|
rssStr+=' <link>'+messageLink+'</link>'
|
||||||
|
rssStr+=' <pubDate>'+pubDate.strftime("%D, %d %M %Y %H:%M:%S Z")+'</pubDate>'
|
||||||
rssStr+=' </item>'
|
rssStr+=' </item>'
|
||||||
return rssStr
|
return rssStr
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue