T
tad na
python 2.7.2
The following code has an error and I can not figure out why:
import feedparser
d = feedparser.parse('http://bl.ocks.org/mbostock.rss')
numb = len(d['entries'])
for post in d.entries:
print post.pubDate+"\n"
-----------------------------------
the error is :
print post.pubDate+"\n"
File "build\bdist.win32\egg\feedparser.py", line 416, in __getattr__
raise AttributeError, "object has no attribute '%s'" % key
AttributeError: object has no attribute 'pubDate'
The following code has an error and I can not figure out why:
import feedparser
d = feedparser.parse('http://bl.ocks.org/mbostock.rss')
numb = len(d['entries'])
for post in d.entries:
print post.pubDate+"\n"
-----------------------------------
the error is :
print post.pubDate+"\n"
File "build\bdist.win32\egg\feedparser.py", line 416, in __getattr__
raise AttributeError, "object has no attribute '%s'" % key
AttributeError: object has no attribute 'pubDate'