I want to create a RSS Feed generator. The generator is supposed to read data from my database and generate RSS feeds for them. I want to write a script that would automatically generate the xml
file for validation.
So if a typical xml
file for RSS feed looks like this:
<item>
<title>Entry Title</title>
<link>Link to the entry</link>
<guid>http://example.com/item/123</guid>
<pubDate>Sat, 9 Jan 2010 16:23:41 GMT</pubDate>
<description>[CDATA[ This is the description. ]]</description>
</item>
I want the script to replace automatically the field between the <item>
and the </item>
tag.
Similarly for all the tags. The value for the tags will be fetched from the database. So I will query for it. My app has been designed in Django.
I am looking for suggestions as to how to do this in python. I am also open to any other alternatives if my idea is vague.
Since this is python. Its good to be using PyRSS2Gen
. Its easy to use and generates the xml really nicely. https://pypi.python.org/pypi/PyRSS2Gen
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With