AttributeError: ResultSet object has no attribute ‘find_all’. You’re probably treating a list of elements like a single element. Did you call find_all() when you meant to call find()?
AttributeError: ResultSet object has no attribute 'find_all'. You're probably treating a list of elements like a single element. Did you call find_all() when you meant to call find()?
解决上边这条报错只需要记住一句话
Tag一定不是数组,Tag一定不是数组,Tag一定不是数组
方法 | 作用 |
---|---|
Tag.find()或Tag,fingd_all() | 提取Tag中的Tag |
Tag.text | 提取Tag中的文字 |
Tag[‘姓名’] | 输入参数:属性名,可以提取Tag中这个属性的值 |