Is there any way to read a collection of extension elements with Universal Feed Parser?
This is just a short snippet from Kuler RSS feed:
<channel>
<item>
<!-- snip: regular RSS elements -->
<kuler:themeItem>
<kuler:themeID>123456</kuler:themeID>
<!-- snip -->
<kuler:themeSwatches>
<kuler:swatch>
<kuler:swatchHexColor>FFFFFF</kuler:swatchHexColor>
<!-- snip -->
</kuler:swatch>
<kuler:swatch>
<kuler:swatchHexColor>000000</kuler:swatchHexColor>
<!-- snip -->
</kuler:swatch>
</kuler:themeSwatches>
</kuler:themeItem>
</item>
</channel>
I tried the following:
>>> feed = feedparser.parse(url)
>>> feed.channel.title
u'kuler highest rated themes'
>>> feed.entries[0].title
u'Foobar'
>>> feed.entries[0].kuler_themeid
u'123456'
>>> feed.entries[0].kuler_swatch
u''
feed.entries[0].kuler_swatchhexcolor
returns only last kuler:swatchHexColor
. Is there any way to retrieve all elements with feedparser
?
I have already worked around the issue by using minidom, but I would like to use Universal Feed Parser if possible (due to very simple API). Can it be extended? I haven't found anything about that in the documentation, so if someone has more experience with the library, please, advise me.