爬虫

  1. Beautifulsoup DOM解析:
dts = soup.find_all("dt",class_="dt mb-4 line")
    for item in dts:
        pass    
  1. 解析网页用html.parser,上次用lxml反正出问题了。

文档地址https://www.crummy.com/software/BeautifulSoup/bs4/doc/index.zh.html

你可能感兴趣的:(爬虫)