爬虫
2019-03-06 本文已影响0人
yumiii_
- 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