kurtmckee/feedparser

Feed parsing works in command line, but not in python file.

person-al opened this issue · 2 comments

Hi! Would love some help understanding what I'm doing wrong here.

I'm using feedparser to parse the following url: https://rss.nytimes.com/services/xml/rss/nyt/Science.xml
I notice that if I test feedparser using the command line's python interpreter, everything is fine. But if I create a python file that tries to parse it, I get the following:

{'bozo': 1, 'entries': [], 'feed': {}, 'headers': {}, 'encoding': 'utf-8', 'version': '', 'bozo_exception': SAXParseException('syntax error'), 'namespaces': {}}

Any idea what might be going on here?

Please post the code you're using at the command line and the code you're writing and running in the Python file.

Please also post what version of feedparser is installed. Thanks!

Closing due to lack of information.