from bs4 import BeautifulSoup soup = BeautifulSoup(open('index.html',encoding='utf-8'),'lxml') print(soup) 就可以使用了本栏目推荐文章Python学习笔记python字典的使用python字符串方法python列表和元组使用介绍python | 小游戏 开局托儿所 自动化脚本 pyautoguipython中的Map和Filterpython-爬元气桌面壁纸python中的*args**和**kwargsPython教程(23)——Python类中常用的特殊成员linux环境Python安装同时 python lxml bs4 bs同时python lxml bs4 图片集python图片bs4 数据python bs4 bs 爬虫python bs4 02 bs4 bs4 05 bs selenium文档bs4标签 selenium文档bs4 css beautifulsoup bs4 bs selenium新闻bs4 css