def extract_rss_urls_from_opml(filename):
    urls = []
with open(filename, 'rt') as f:
    tree = ElementTree.parse(f)
for node in tree.findall('.//outline'):
    url = node.attrib.get('xmlUrl')
if url:
    urls.append(url)
return urls
urls = extract_rss_urls_from_opml('your_file')
How do you extract feed urls from an OPML file exported from Google Reader?