墨绿Zz 2021-04-17 16:30 采纳率: 25%
浏览 90

python 链家爬虫 bs4解析不出来??

求求各位网友帮个忙  我实在看不出哪里错了

报错 如下:

Traceback (most recent call last):
  File "C:/Users/11757/Desktop/爬虫/test.py", line 48, in <module>
    get_parese(respone)
  File "C:/Users/11757/Desktop/爬虫/test.py", line 38, in get_parese
    title = item.find(name = 'div', class_ = 'title').find(name = 'a').string
AttributeError: 'NoneType' object has no attribute 'find'
 

  • 写回答

4条回答 默认 最新

  • 木三136 2021-04-17 17:24
    关注

    在开始爬取时,首先您需要确定是否获得了网页源码 即该网站是否时使用的动态加载 

    评论

报告相同问题?