parsecer
parsecer

Reputation: 5106

BeautifulSoup difference between findAll and findChildren

What is the difference? Don't they do the same thing - find the inside tags with given properties?

Upvotes: 4

Views: 1956

Answers (1)

Padraic Cunningham
Padraic Cunningham

Reputation: 180441

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

It's there for backwards compatibility as is findAll = find_all # BS3

Upvotes: 3

Related Questions