Beautiful Soup Find_all Doesn't Find Css Selector With Multiple Classes
On the website there is this element
Solution 1:
As the docs you quoted explain, if you want to search for tags that match two CSS classes, you have to use a CSS selector instead of a find_all
. The example you quoted shows how to do that:
css_soup.select("p.strikeout.body")
But you didn't do that; you used find_all
anyway, and of course it didn't work, because find_all
doesn't take a CSS selector.
Change it to use select
, which does take a CSS selector, and it will work.
Post a Comment for "Beautiful Soup Find_all Doesn't Find Css Selector With Multiple Classes"