本文介绍了findAll和findChildren之间的BeautifulSoup区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有什么区别?他们不做同样的事情-查找具有给定属性的内部标签吗?
What is the difference? Don't they do the same thing - find the inside tags with given properties?
推荐答案
findChildren 返回 resultSet ,就像 find_all 一样,没有 findChildren 实际上是 find_all ,如果您查看指向源的链接,则可以看到:
findChildren returns a resultSet just as find_all does, there is no difference in using either method as findChildren is actually find_all, if you look at the link to the source you can see:
findChildren = find_all # BS2
它在那里是向后兼容的,就像findAll = find_all # BS3
It's there for backwards compatibility as is findAll = find_all # BS3
这篇关于findAll和findChildren之间的BeautifulSoup区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!