I am fairly new to the feedparser lib in Python.
Trying to parse out a complete list of timestamps from a RSS feed, I currently have:
import feedparser
from time import gmtime, strftime
d = feedparser.parse('http://www.bloomberg.com/feed/podcast/taking-stock.xml')
dPub = d.entries[0].published # out: u'Mon, 06 May 2013 08:19:36 -0400'
dPubPretty = strftime(dPub, gmtime())
print dPubPretty # out: Mon, 06 May 2013 08:19:36 -0400
# loop over d.entries[0:] - ???
# for all d.entries...
d.entries[1].published # out: u'Mon, 06 May 2013 08:16:15 -0400'
d.entries[2].published # out: u'Fri, 03 May 2013 09:01:50 -0400'
I'd like to loop over all d.entries and output a list of timestamps, so with strftime() applied, the output would be something like:
# output goal:
Mon, 06 May 2013 08:19:36 -0400
Mon, 06 May 2013 08:16:15 -0400
Fri, 03 May 2013 09:01:50 -0400
...
Referencing these docs:
feedparser - Content Normalization: http://pythonhosted.org/feedparser/content-normalization.html#advanced-normalization
time - Time access and conversions: http://docs.python.org/2/library/time.html#time.strftime