Short RSS Feed Reader(6 lines)





9
Date Submitted Fri. Aug. 18th, 2006 10:59 AM
Revision 1 of 1
Scripter ASmith
Tags python
Comments 0 comments
Reads well formed RSS entries using standard python libraries

###
Description: RSS Feed reader in 6 lines
URL:http://sebsauvage.net/python/snyppets/index.html
License:Unspecified/Public Domain
###
import urllib, sys, xml.dom.minidom
address = 'http://www.sebsauvage.net/rss/updates.xml'
document = xml.dom.minidom.parse(urllib.urlopen(address))
for item in document.getElementsByTagName('item'):
    title = item.getElementsByTagName('title')[0].firstChild.data
    print "Title:", title.encode('latin-1','replace')
 

Comments

There are currently no comments for this snippet.

Voting