I am trying to run example from feedparser documentation
What I have tried so far
import feedparser
d = feedparser.parse('http://feedparser.org/docs/examples/atom10.xml')
print d.etag
I am getting this error for etag
AttributeError: object has no attribute 'etag'
I have also tried
print d.modified
Same error
AttributeError: object has no attribute 'modified'
print d
gives me this
{'feed': {'summary': u''}, 'status': 302, 'version': u'', 'encoding': u'utf-8', 'bozo': 1, 'headers': {'content-length': '333', 'content-encoding': 'gzip', 'age': '1', 'expires': '-1', 'vary': 'Accept-Encoding', 'server': 'Microsoft-IIS/7.5', 'connection': 'close', 'pragma': 'no-cache', 'cache-control': 'no-cache', 'date': 'Tue, 19 Sep 2017 06:39:58 GMT', 'x-powered-by': 'ASP.NET', 'content-type': 'text/html; charset=utf-8', 'x-aspnet-version': '4.0.30319'}, 'href': u'http://feedparser.org/docs/examples/atom10.xml', 'namespaces': {}, 'entries': [], 'bozo_exception': SAXParseException('no element found',)}
There is no etag or modified key here. What am I missing?