课程视频地址:
https://edu.csdn.net/course/detail/28645

搜索文档树find_all方法-keyword参数
keyword参数
文档内容如下:

html_doc = “”"

The Dormouse's story

The Dormouse's story

Once upon a time there were three little sisters; and their names were Elsie, Lacie and Tillie; and they lived at the bottom of a well.

...

"""

如果一个指定名字的参数不是搜索内置的参数名,搜索时会把该参数当作指定名字tag的属性来搜索,如果包含一个名字为 id 的参数,Beautiful Soup会搜索每个tag的”id”属性。
【四二学堂】搜索文档树find_all方法-keyword参数
【四二学堂】搜索文档树find_all方法-keyword参数
【四二学堂】搜索文档树find_all方法-keyword参数

使用多个指定名字的参数可以同时过滤tag的多个属性:
【四二学堂】搜索文档树find_all方法-keyword参数
【四二学堂】搜索文档树find_all方法-keyword参数
【四二学堂】搜索文档树find_all方法-keyword参数

相关文章:

  • 2023-03-07
  • 2021-09-04
  • 2021-12-09
  • 2021-11-19
  • 2021-10-13
  • 2021-10-18
  • 2021-11-04
  • 2021-05-17
猜你喜欢
  • 2021-11-22
  • 2021-10-28
  • 2021-05-18
  • 2021-06-23
  • 2021-08-03
  • 2021-12-21
  • 2022-12-23
相关资源
相似解决方案