Quantcast
Channel: How do I access pubDate for RSS items using Python feedparser? - Stack Overflow
Viewing all articles
Browse latest Browse all 2

How do I access pubDate for RSS items using Python feedparser?

0
0

In this example RSS feed, the optional item element pubDate is included in all entries. But it is not available as a item element in the Python module feedparser. This code:

import feedparserrss_object = feedparser.parse("http://cyber.law.harvard.edu/rss/examples/rss2sample.xml")for entry in rss_object.entries:    print entry.pubDate

Causes the error AttributeError: object has no attribute 'pubDate' but I can successfully do print entry.description and see the contents of all the description tags.


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images