From 65ed51cb89cac416c2adb9a88626f85ab5b8d331 Mon Sep 17 00:00:00 2001 From: Leonard Richardson Date: Wed, 8 May 2013 13:06:25 -0400 Subject: Updated docs with new examples. --- doc/source/index.rst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/doc/source/index.rst b/doc/source/index.rst index c106f00..f44f896 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -1651,6 +1651,15 @@ Find tags `directly` beneath other tags:: soup.select("body > a") # [] +Find the siblings of tags:: + + soup.select("#link1 ~ .sister") + # [Lacie, + # Tillie] + + soup.select("#link1 + .sister") + # [Lacie] + Find tags by CSS class:: soup.select(".sister") -- cgit v1.2.3