from RSS import ns, CollectionChannel, TrackingChannel
import urllib
tc = TrackingChannel()
tc.parse("http://news.google.com/?output=rss")
RSS10_TITLE = (ns.rss10, 'title')
RSS10_DESC = (ns.rss10, 'description')
items = tc.listItems()
for item in items:
url = item[0]
print "RSS Item:", url
item_data = tc.getItem(item)
newsItem = urllib.urlopen(url)
savedItem = open(item_data.get(RSS10_TITLE, "(none)"), 'w')
savedItem.write(newsItem.read())
newsItem.close()
savedItem.close()
But as I haven't tested the above, there's no guarantee it'll work right off the bat.You are not logged in, either login or create an account to post comments
posted by Jaltcoh at 3:40 PM on May 7