Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #70638

Re: feedparser error

Newsgroups comp.lang.python
Date 2014-04-26 12:22 -0700
References <4f7cfadc-6b9b-488a-b2cd-b90dd53acbfc@googlegroups.com> <mailman.9522.1398531344.18130.python-list@python.org>
Message-ID <b6bcc4b4-c7fd-4571-9e09-3a4da0489f18@googlegroups.com> (permalink)
Subject Re: feedparser error
From tad na <teddybubu@gmail.com>

Show all headers | View raw



You guys are good. thanks.



=======================================
On Saturday, April 26, 2014 11:55:35 AM UTC-5, MRAB wrote:
On 2014-04-26 03:16, tad na wrote:

 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 only thing I can think of is feedparser does not like uppercase(pubDate)?????
 I can not change someone else's rss.   What can I do here?
Print dir(post) to see what attributes it has.

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

feedparser error tad na <teddybubu@gmail.com> - 2014-04-25 19:16 -0700
  Re: feedparser error Kushal Kumaran <kushal.kumaran@gmail.com> - 2014-04-26 22:17 +0530
  Re: feedparser error MRAB <python@mrabarnett.plus.com> - 2014-04-26 17:55 +0100
    Re: feedparser error tad na <teddybubu@gmail.com> - 2014-04-26 12:22 -0700

csiph-web