There is bunch of error when I try to use "python feedparser"; while during installation there is no complain. I do some thing like this:
import feedparser
url = "http://blogsearch.google.dk/blogsearch_feeds?" + \
"q=visitdenmark&output=atom"
f = feedparser.parse(url)
and the error :
f = feedparser.parse(url)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.6/dist-packages/feedparser.py", line 3798, in parse
feedparser.feed(data.decode('utf-8', 'replace'))
File "/usr/local/lib/python2.6/dist-packages/feedparser.py", line 1851, in feed
sgmllib.SGMLParser.feed(self, data)
File "/usr/lib/python2.6/sgmllib.py", line 104, in feed
self.goahead(0)
File "/usr/lib/python2.6/sgmllib.py", line 143, in goahead
k = self.parse_endtag(i)
File "/usr/lib/python2.6/sgmllib.py", line 320, in parse_endtag
self.finish_endtag(tag)
File "/usr/lib/python2.6/sgmllib.py", line 360, in finish_endtag
self.unknown_endtag(tag)
File "/usr/local/lib/python2.6/dist-packages/feedparser.py", line 659, in unknown_endtag
self.pop(prefix + suffix)
File "/usr/local/lib/python2.6/dist-packages/feedparser.py", line 868, in pop
mfresults = _parseMicroformats(output, self.baseuri, self.encoding)
File "/usr/local/lib/python2.6/dist-packages/feedparser.py", line 2412, in _parseMicroformats
p = _MicroformatsParser(htmlSource, baseURI, encoding)
File "/usr/local/lib/python2.6/dist-packages/feedparser.py", line 2016, in __init__
self.document = BeautifulSoup.BeautifulSoup(data)
AttributeError: 'module' object has no attribute 'BeautifulSoup'
Hearing from you,
It looks like you need to install BeautifulSoup:
PS. You've installed a version of feedparse in /usr/local. There is also an Ubuntu package for feedparser:
python-feedparser
. It may not be as new, but installing it would have drawn in all dependencies for you.