bs4没了find_all函数
File "c:\Users\Administrator\爬虫1.py", line 5, in <module>targets =b.find_all("div",class_="hd")
AttributeError: module 'bs4' has no attribute 'find_all'
我这个bs4怕不是假的
这个find_all去哪了? 要 BeautifulSoup 对象才有 find_all 方法,模块 bs4 是没有这个方法的 isdkz 发表于 2022-4-16 08:51
要 BeautifulSoup 对象才有 find_all 方法,模块 bs4 是没有这个方法的
可我pip下载它却失败了,whl文件和BeautifulSoup-3.2.1.tar.gz一个都没下成 本帖最后由 isdkz 于 2022-4-16 20:18 编辑
__add__ 发表于 2022-4-16 15:47
可我pip下载它却失败了,whl文件和BeautifulSoup-3.2.1.tar.gz一个都没下成
你不是已经有 bs4 模块了吗?BeautiSoup 对象是 bs4 模块里面的,
你可以通过以下方式导入:from bs4 import BeautifulSoup
页:
[1]