BeautifulSoup4 and lxml notes

来源:互联网 发布:ubuntu 16.04 uuidgen 编辑:程序博客网 时间:2024/06/05 11:51

BeautifulSoup4 parsing with lxml as the backend may have issues in Windows if lxml is not installed properly.

I encountered BS4 not correctly parse html content when lxml is installed with pip.

I red the lxml’s FAQ:

Two of the major design issues of this operating system make it non-trivial for its users to build lxml: the lack of a pre-installed standard compiler and the missing package management.

Christoph Gohlke generously provides unofficial lxml binary builds for Windows that are usually very up to date. Consider using them if you prefer a binary build over a signed official source release.

After installed Christoph Gohlke’s lxml package, the issue gone.

0 0
原创粉丝点击