Fixed RSS item images
This commit is contained in:
parent
60ab950093
commit
8a62c6a915
1 changed files with 2 additions and 5 deletions
|
@ -107,7 +107,7 @@ def rss_route():
|
|||
pages = get_pages(with_content=True)
|
||||
|
||||
return Response('''<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<rss version="2.0">
|
||||
<rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/>
|
||||
<channel>
|
||||
<title>Platypush blog feeds</title>
|
||||
<link>http://blog.platypush.tech</link>
|
||||
|
@ -132,15 +132,12 @@ def rss_route():
|
|||
<link>https://blog.platypush.tech{link}</link>
|
||||
<pubDate>{published}</pubDate>
|
||||
<description><![CDATA[{content}]]></description>
|
||||
<image>
|
||||
<url>https://blog.platypush.tech/img{image}</url>
|
||||
</image>
|
||||
<media:content medium="image" url="https://blog.platypush.tech/img{image}" width="200" height="150" />
|
||||
</item>
|
||||
'''.format(
|
||||
title=page.get('title', '[No Title]'),
|
||||
link=page.get('uri', ''),
|
||||
published=page['published'].strftime('%a, %d %b %Y %H:%M:%S GMT') if 'published' in page else '',
|
||||
# description=page.get('description', ''),
|
||||
content=page.get('content', ''),
|
||||
image=page.get('image', ''),
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue