#pip安装lxml解析方法
pip3 install lxml
#或者通过wheel安装
#下载对应系统版本的wheel文件:http://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml
pip3 install lxml-4...whl
#pip安装beautifulsoup4库
pip3 install beautifulsoup4
# 从bs4导入BeautifulSoup库
from bs4 import BeautifulSoup
# 生成soup对象,传入html代码和解析方法lxml
soup = BeautifulSoup('<html></html>','lxml')
