'features="html.parser"' to the BeautifulSoup constructor. 安装:pip install lxml 然后修改:bso = BeautifulSoup(html.read(),"html.parser")