diff options
Diffstat (limited to 'doc/source')
-rw-r--r-- | doc/source/index.rst | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/doc/source/index.rst b/doc/source/index.rst index d35481e..1b7b1e6 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -1735,6 +1735,10 @@ Match language codes:: # <p lang="en-us">Howdy, y'all</p>, # <p lang="en-gb">Pip-pip, old fruit</p>] +Find only the first tag that matches a selector:: + + soup.select_one(".sister") + # <a class="sister" href="http://example.com/elsie" id="link1">Elsie</a> This is all a convenience for users who know the CSS selector syntax. You can do all this stuff with the Beautiful Soup API. And if CSS |