#!/usr/bin/python3

from urllib.request import urlopen
from xml.etree.ElementTree import parse

# Download the RSS feed and parse it
u = urlopen('http://planet.python.org/rss20.xml')
doc = parse(u)

# Extract and output tags of interest
for item in doc.iterfind('channel/item'):
	title = item.findtext('title')
	date = item.findtext('pubDate')
	link = item.findtext('link')

	print(title)
	print(date)
	print(link)
	print()
print("Program executed.")


[((7, 4, 7, 49), 'urllib.request.urlopen', 'urlopen', ({(7, 12, 7, 48): '"""http://planet.python.org/rss20.xml"""'}, {}), "('http://planet.python.org/rss20.xml')", False, 'from urllib.request import urlopen\n'), ((8, 6, 8, 14), 'xml.etree.ElementTree.parse', 'parse', ({(8, 12, 8, 13): 'u'}, {}), '(u)', False, 'from xml.etree.ElementTree import parse\n')]