摘要: soup = BeautifulSoup(html_doc,features='lxml')tag1 = soup.find(name='a') #找到第一个a标签,返回一soup对象tag2 = soup.find_all(name='a') #找到所有a标签,返回一列表,列表中所有元素为soup对象tag3 = soup.select('#link2') #找到id=link2的标签n... 阅读全文
posted @ 2018-07-09 23:17 benchdog 阅读(249) 评论(0) 推荐(0) 编辑