From 9f811070c46bfca9868b0365b8c209bd2ca17924 Mon Sep 17 00:00:00 2001 From: Leonard Richardson Date: Sat, 6 May 2017 14:43:41 -0400 Subject: Renamed convenience method to get_attribute_text. --- doc/source/index.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc/source') diff --git a/doc/source/index.rst b/doc/source/index.rst index 0d13e0a..7bee329 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -428,10 +428,10 @@ consolidated:: print(rel_soup.p) #

Back to the homepage

-You can use ```string_attr`` to get the value of any attribute as a +You can use ```get_attribute_text`` to get the value of any attribute as a string, whether or not it's a multi-valued atribute:: - css_soup.p.string_attr('class') + css_soup.p.get_attribute_text('class') # "body strikeout" If you parse a document as XML, there are no multi-valued attributes:: -- cgit v1.2.3