Forums

feedparser is not working in consoles but working fine locally.

When I try to parse the data using feedparser but it is not working in python anywhere console whereas it is working locally. I got an error saying:

Type "help", "copyright", "credits" or "license" for more information.
>>> import feedparser

>>> d = feedparser.parse('https://www.nasa.gov/rss/dyn/breaking_news.rss')

>>> print(d.title)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/feedparser.py", line 400, in __getattr__
    raise AttributeError, "object has no attribute '%s'" % key
AttributeError: object has no attribute 'title' .

Thanks in advance.

[edit by admin: formatting]

I think that's happening because www.nasa.gov is not on the whitelist of sites that you can access from a free PythonAnywhere account.

thank I upgraded my account and it seems working now. Is there any good tutorial by python anywhere department to set up the custom domain?

Yes, it will

Hmm, I think maybe Glenn was responding to a different post there...?

Anyway, here are some links regarding custom domains: