soup = BeautifulSoup(html, 'html5lib')
用這個(gè)就解決了桃犬。(pip install html5lib)
html =getPage(url)
soup = BeautifulSoup(html, 'html5lib')
fixed_html = soup.prettify()
htmlll = etree.HTML(fixed_html)
page = htmlll.xpath('//div[@class="dashi"]/a')
soup = BeautifulSoup(html, 'html5lib')
用這個(gè)就解決了桃犬。(pip install html5lib)
html =getPage(url)
soup = BeautifulSoup(html, 'html5lib')
fixed_html = soup.prettify()
htmlll = etree.HTML(fixed_html)
page = htmlll.xpath('//div[@class="dashi"]/a')