标签选择器

BeautifulSoup简单使用
标签选择器将第一个匹配的进行返回
BeautifulSoup简单使用
BeautifulSoup简单使用BeautifulSoup简单使用

BeautifulSoup简单使用
BeautifulSoup简单使用
contents查询子节点
BeautifulSoup简单使用
children获取所有子节点是迭代器 用for循环可以打印出来
BeautifulSoup简单使用
descendants获取所有的子孙节点,内容也作为一部分

BeautifulSoup简单使用
parent查询父节点
parents 查询祖先节点
BeautifulSoup简单使用
BeautifulSoup简单使用
一个是前面的兄弟节点,一个是后面的兄弟节点

标准选择器

BeautifulSoup简单使用
BeautifulSoup简单使用
BeautifulSoup简单使用

BeautifulSoup简单使用
BeautifulSoup简单使用
注意class关键字

BeautifulSoup简单使用

BeautifulSoup简单使用

查找另外节点
BeautifulSoup简单使用

css选择器

BeautifulSoup简单使用
class关键字 换成" . " id直接写成 #(等号后面的)
BeautifulSoup简单使用

BeautifulSoup简单使用

BeautifulSoup简单使用

BeautifulSoup简单使用

相关文章: