Code: Select all
#!/usr/bin/env python
import urllib, sys, xml.dom.minidom
address = 'http://www.knoxgothic.com/forum/rss.php'
document = xml.dom.minidom.parse(urllib.urlopen(address))
for item in document.getElementsByTagName('item'):
title = item.getElementsByTagName('title')[0].firstChild.data
url = item.getElementsByTagName('link')[0].firstChild.data
print "Title: %s" % title.encode('latin-1','replace'),
print "URL: %s" % url.encode('latin-1','replace')
** if you copy/paste this, remember that in python, indentation is very important.