#!/usr/bin/python import urllib, re from xml.sax.saxutils import escape url = 'http://www.keithba.net/blog/' file = '/home/rubys/web/intertwingly.net/synfeeds/keithba.rss' try: page=urllib.urlopen(url).read() except IOError: page='' except AssertionError: # I don't understand this, but... page='' rss=""" KeithBa's Blog http://www.keithba.net/blog/ An RSS feed kindly donated by Sam Ruby en-us """ pattern = re.compile(' 
\s+(.*?)\s+

\s+',re.S) for (description, link) in pattern.findall(page): rss+="\n\n%s%s\n%s\n" % (url, link, escape(description)) rss+="""
""" if page and rss<>open(file).read(): fh=open(file,'w') fh.write(rss) fh.close()