当试图刮掉一些与BeautifulSoup和Django返回:Django的BeautifulSoup FeatureNotFound
Couldn't find a tree builder with the features you requested: html,fast. Do you need to install a parser library?
的这是在停止代码行是:
urlContent = urllib2.urlopen(url).read()
soup = BeautifulSoup(''.join(urlContent))
我已经尝试了不同的方式来进口:
from bs4 import BeautifulSoup
import BeautifulSoup
etc, etc.
我在一个残端,我不知道这是什么套管或为什么。在.py中测试时效果很好,所以我只能假设它是Django。任何已知的修复/解决办法?
Traceback:
File "C:\Python27\lib\site-packages\django\core\handlers\base.py" in get_response
114. response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "D:\django\bin\project\Main\functions.py" in mangasee
44. soup = BeautifulSoup(''.join(urlContent))
File "D:\django\bin\project\Main\bs4\__init__.py" in __init__
152. % ",".join(features))
Exception Type: FeatureNotFound at /moderator/
Exception Value: Couldn't find a tree builder with the features you requested: html,fast. Do you need to install a parser library?
请显示完整的回溯和发生错误的行。谢谢。 – alecxe 2014-09-06 01:48:34
@alecxe加入了什么 – user1043816 2014-09-06 02:04:24
安装'html5lib'有帮助吗? ('pip install html5lib') – alecxe 2014-09-06 02:19:10