This article was originally published by Python Magazine in November of 2007.

Caching RSS Feeds With feedcache

Listing3.py

#!/usr/bin/env python
"""Print contents of feeds specified on the command line.
"""

import feedparser
import sys

for url in sys.argv[1:]:
    data = feedparser.parse(url)
    for entry in data.entries:
        print '%s: %s' % (data.feed.title, entry.title)

Original Format