Il y a beaucoup d'erreur quand j'essaie d'utiliser "python feedparser"; pendant l'installation, il n'y a pas de plainte. je fais quelque chose comme ceci:erreur python feedparser installer
import feedparser
url = "http://blogsearch.google.dk/blogsearch_feeds?" + \
"q=visitdenmark&output=atom"
f = feedparser.parse(url)
et l'erreur:
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'
audience de votre part,
"importer BeautifulSoup" fonctionne-t-il dans la console python? –