我是在写爬虫是遇到了这个问题: 

c = chapter.select('href')
AttributeError: 'list' object has no attribute 'select'

这是我的代码:

chapter = soup.select('ul._chapter > li > a')
c = chapter.select('href')

原因: select 返回的是一个列表list, 而list是没有select方法的. 所以用不了.

解决办法,换正则,详见: https://blog.csdn.net/qq_41684261/article/details/86627580

相关文章:

  • 2022-12-23
  • 2022-01-18
  • 2022-12-23
  • 2022-12-23
  • 2022-02-20
  • 2022-02-28
  • 2021-10-26
  • 2021-10-09
猜你喜欢
  • 2022-12-23
  • 2021-09-09
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-31
相关资源
相似解决方案