“module”对象在 Python 中不可调用

'module' object is not callable in python

提问人:Inam Buneri 提问时间:6/8/2023 最后编辑:MatthiasInam Buneri 更新时间:6/8/2023 访问量:41

问:

!pip install bs4
!pip install html5lib
import pandas as pd
!pip install lxml
import requests
import bs4 as BeautifulSoup

url = "https://cf-courses-data.s3.us.cloud-object-storage.appdomain.cloud/IBMDeveloperSkillsNetwork-PY0220EN-SkillsNetwork/labs/project/netflix_data_webpage.html"

data=requests.get(url).text

soup = BeautifulSoup(data,'html5lib')

我得到的模块是不可调用的,请任何人帮助我

想要解析数据

python 网页抓取 beautifulsoup html 解析

评论

0赞 qrsngky 6/8/2023
这有帮助吗?stackoverflow.com/questions/72637168/......

答:

1赞 arlaine 6/8/2023 #1

您导入 BeautifulSoup 不正确,请将其更改为from bs4 import BeautifulSoup