BeautifulSoup简单使用
2020-01-17 本文已影响0人
slytherinwyne
from bs4import BeautifulSoup
html =open(file_path, 'r', encoding='utf-8')
bsObj = BeautifulSoup(html, 'lxml')
table = bsObj.find_all('table')
rows = table[0].find_all('tr')
from bs4import BeautifulSoup
html =open(file_path, 'r', encoding='utf-8')
bsObj = BeautifulSoup(html, 'lxml')
table = bsObj.find_all('table')
rows = table[0].find_all('tr')