Python读取本地文件并解析网页元素的方法
如下所示:frombs4importBeautifulSouppath='./web/new_index.html'withopen(path,'r')asf:Soup=BeautifulSoup(f.read(),'l
读取本地文件
如下所示:frombs4importBeautifulSouppath='./web/new_index.html'withopen(path,'r')asf:Soup=BeautifulSoup(f.read(),'l