
Python爬虫环境与爬虫简介
soup.select('a[href="http://example.com/elsie"]')#通过属性的值来查找。.soup.select('a[href”="http://example.com/"]')#通过属性的值来查找.soup.select(".sister")#通过CSS的类名查找(即class属性为sister的所有标签)soup.select("p > #link1")#选择父元素为 且id属性为link1的所有标签。soup.find_all('p')#根据名称查找标签。







