Support rss images
This commit is contained in:
parent
2529bdd36a
commit
d3838e1a5a
@ -172,6 +172,9 @@ def source(xsource, source, bozo, format):
|
|||||||
createTextElement(xsource, 'icon', source.get('icon', None))
|
createTextElement(xsource, 'icon', source.get('icon', None))
|
||||||
createTextElement(xsource, 'logo', source.get('logo', None))
|
createTextElement(xsource, 'logo', source.get('logo', None))
|
||||||
|
|
||||||
|
if not source.has_key('logo') and source.has_key('image'):
|
||||||
|
createTextElement(xsource, 'logo', source.image.get('href',None))
|
||||||
|
|
||||||
for tag in source.get('tags',[]):
|
for tag in source.get('tags',[]):
|
||||||
category(xsource, tag)
|
category(xsource, tag)
|
||||||
|
|
||||||
|
12
tests/data/reconstitute/rss_image.xml
Normal file
12
tests/data/reconstitute/rss_image.xml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
<!--
|
||||||
|
Description: logo
|
||||||
|
Expect: source.logo == 'http://example.com/logo.jpg'
|
||||||
|
-->
|
||||||
|
|
||||||
|
<rss version="2.0">
|
||||||
|
<channel>
|
||||||
|
<image><url>http://example.com/logo.jpg</url></image>
|
||||||
|
<item/>
|
||||||
|
</channel>
|
||||||
|
</rss>
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user