**
soup获得的源码处理
**
问题描述:
soup=BeautifulSoup(driver.page_source,'lxml')
这个soup还不能直接正则
需要换一下
soup=BeautifulSoup(driver.page_source,'lxml')
soup.encode('utf-8')
with open('','w',encoding='utf-8') as f:
f.write(soup.prettify())
soup的一些简单查找
soup.find(attrs={'data-custom':'xxx'})
soup.find(attrs={'class':'xxx'})
p=soup.find('ul', id="producers")