Hi,

While using the feedparser library for downloading RSS feeds some of
the blog entries seem to have no title.

 File "build\bdist.win32\egg\feedparser.py", line 382, in __getattr__
AttributeError: object has no attribute 'title'

Is there a way to test the existence of an attribute?

I can use an exception but like below to see whether it exists but
this is a clumsy way since the function has to return the title.

  d=feedparser.parse(url,handlers = [proxy])
  try:
    print "TITLE ",d.feed.title
  except:
    print "HAS NO TITLE"
  wc={}

Regards HansPeter
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to