|
发表于 2020-6-16 22:59:16
|
显示全部楼层
本帖最后由 欧皇肥宅 于 2020-6-16 23:11 编辑
我运行试了一下,出错了
正在抓取第1页链接
Traceback (most recent call last):
File "E:/Python/yuanma/爬取链家房源.py", line 61, in <module>
main() #运行函数,开始疯狂的采集数据吧
File "E:/Python/yuanma/爬取链家房源.py", line 57, in main
url_list = get_url(1,11) #这里一共11页,所以设置了1,11的范围
File "E:/Python/yuanma/爬取链家房源.py", line 19, in get_url
soup = BeautifulSoup(page_data.text,'lxml') #创建一个实例化BeautifulSoup类,类为一级网址的页面。意思就是根据配方熬一锅汤
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38-32\lib\site-packages\bs4\__init__.py", line 242, in __init__
raise FeatureNotFound(
bs4.FeatureNotFound: Couldn't find a tree builder with the features you requested: lxml. Do you need to install a parser library?
然后我去添加csv,系统说找不到这个库。 |
|