diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/source/index.rst | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/doc/source/index.rst b/doc/source/index.rst index 03d4824..79286ab 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -1266,6 +1266,12 @@ But searching for variants of the string value won't work:: css_soup.find_all("p", class_="strikeout body") # [] +If you want to search for tags that match two or more CSS classes, you +should use a CSS selector:: + + css_soup.select("p.strikeout.body") + # [<p class="body strikeout"></p>] + There's a shortcut for ``class_`` present in all versions of Beautiful Soup. The second argument to any ``find()``-type method is called ``attrs``, and passing in a string for ``attrs`` will search for that |