$ apt-get install python-bs4 |
$ easy_install beautifulsoup4$ pip install beautifulsoup4 |
bs4只有py2的代码,安装在py3下会很麻烦
bs4支持HTML parser,也可以支持第三方的分析器
$ apt-get install python-lxml$ easy_install lxml$ pip install lxml |
$ apt-get install python-html5lib$ easy_install html5lib$ pip install html5lib |
原文:http://www.cnblogs.com/lizunicon/p/3518071.html