October 18th, 2004, 04:35 PM
i am supposed to make a rss feeder, where should i start?? have anybody any code examples???
October 18th, 2004, 05:40 PM
Not sure if you mean to create an rss feed or parse an rss feed. Anyway it's not too hard with the xml functionality in the standard library. The xml.dom.minidom package is a good start.
Alternatively, use the excellent ElementTree module.
If rss.xml is an RSS 1.0 file this code should store the urls and titles of the items in the rss file as a list of (url, title) tuples.
rssfile = "rss.xml"
buffer = 
doc = xml.dom.minidom.parse(rssfile)
items = doc.getElementsByTagName("item")
for item in items:
link = item.getElementsByTagName("link")
url = str(link.firstChild.data.strip())
title = item.getElementsByTagName("title")
title = str(title.firstChild.data.strip())
October 18th, 2004, 08:06 PM
Perhaps a google for python rss py
October 19th, 2004, 06:52 AM
Maybe worth mentioning: Pythons current RSS offerings don't work on Windows since they seem to be using *nix only features - Specifically Mark Nottinghams RSS.py
October 21st, 2004, 10:38 AM
October 21st, 2004, 02:50 PM
Wow, why didn't this come up in my search on google . Thanks for the link!