问题
What is the difference? Don't they do the same thing - find the inside tags with given properties?
回答1:
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
来源:https://stackoverflow.com/questions/38838460/beautifulsoup-difference-between-findall-and-findchildren