【bs4】安装beautifulsoup


  • Debian/Ubuntu,install
$ apt-get install python-bs4
  •  easy_install/pip
$ easy_install beautifulsoup4

$ pip install beautifulsoup4
  •  安装第三方分析器

bs4只有py2的代码,安装在py3下会很麻烦

bs4支持HTML parser,也可以支持第三方的分析器

    • lxml
$ apt-get install python-lxml
$ easy_install lxml
$ pip install lxml
    • html5lib
$ apt-get install python-html5lib
$ easy_install html5lib
$ pip install html5lib

 BeautifulSoup4中文文档

 

 

 

 

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM