Open Qiu-Weidong opened 1 year ago
https://qiu-weidong.github.io/2022/12/12/python/beautifulsoup/
导入BeautifulSoup 1from bs4 import BeautifulSoup 构造BeautifulSoup对象 123soup = BeautifulSoup(html_str, 'lxml')# 也可以使用文件soup = BeautifulSoup(open('index.html'), 'lxml) 节点选择器选择元素 直接
https://qiu-weidong.github.io/2022/12/12/python/beautifulsoup/
导入BeautifulSoup 1from bs4 import BeautifulSoup 构造BeautifulSoup对象 123soup = BeautifulSoup(html_str, 'lxml')# 也可以使用文件soup = BeautifulSoup(open('index.html'), 'lxml) 节点选择器选择元素 直接