speedparser
speedparser copied to clipboard
Not work with http://news.ycombinator.com/rss
>>> import speedparser
>>> feed = "http://news.ycombinator.com/rss"
>>> speedparser.parse(feed)
{'bozo_tb': 'Traceback (most recent call last):\n File "/home/kir/.virtualenvs/rss/lib/python3.5/site-packages/speedparser/speedparser.py", line 688, in parse\n parser = SpeedParser(document, cleaner, unix_timestamp, encoding)\n File "/home/kir/.virtualenvs/rss/lib/python3.5/site-packages/speedparser/speedparser.py", line 585, in __init__\n self.tree = tree.getroottree()\nAttributeError: \'NoneType\' object has no attribute \'getroottree\'\n', 'bozo_exception': AttributeError("'NoneType' object has no attribute 'getroottree'",), 'bozo': 1, 'feed': {}, 'entries': []}
It seems speedparser does not include feedparsers handling of URLs. You have to get the feed with something like:
import urllib2
feed=urllib2.urlopen('http://newsroom.co.nz/feed/rss')
speedparser.parse(feed.read())