feedparser icon indicating copy to clipboard operation
feedparser copied to clipboard

feedparser does not return an error on empty files

Open dechamps opened this issue 7 months ago • 0 comments

$ python3 -c 'import feedparser; import pprint; pprint.pp(feedparser.parse("/dev/null"));'
{'bozo': False, 'entries': [], 'feed': {}, 'headers': {}}

This makes it look like /dev/null is a valid feed with no entries, which is clearly not the case - an empty file is not a valid feed. An error should be reported instead (ideally an exception, see #329).

dechamps avatar Jul 23 '24 09:07 dechamps