- Beautifulsoup DOM解析:
dts = soup.find_all("dt",class_="dt mb-4 line")
for item in dts:
pass
- 解析网页用html.parser,上次用lxml反正出问题了。
文档地址https://www.crummy.com/software/BeautifulSoup/bs4/doc/index.zh.html
dts = soup.find_all("dt",class_="dt mb-4 line")
for item in dts:
pass
文档地址https://www.crummy.com/software/BeautifulSoup/bs4/doc/index.zh.html