diff options
author | Leonard Richardson <leonardr@segfault.org> | 2016-12-19 17:45:07 -0500 |
---|---|---|
committer | Leonard Richardson <leonardr@segfault.org> | 2016-12-19 17:45:07 -0500 |
commit | fad293d237aadcbd2576e3fd347831724fe847cf (patch) | |
tree | 4b28f93cdd8e77134bdb1c6e018110dbae856963 | |
parent | cf7750630e32978c0095ee5ec4ea9206a35665de (diff) | |
download | beautifulsoup4-fad293d237aadcbd2576e3fd347831724fe847cf.tar.gz |
Documentation fixes. [bug=1651050]
-rw-r--r-- | doc/source/index.rst | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/doc/source/index.rst b/doc/source/index.rst index cd1ab2f..56aa7fe 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -1050,7 +1050,7 @@ A regular expression ^^^^^^^^^^^^^^^^^^^^ If you pass in a regular expression object, Beautiful Soup will filter -against that regular expression using its ``match()`` method. This code +against that regular expression using its ``search()`` method. This code finds all the tags whose names start with the letter "b"; in this case, the <body> tag and the <b> tag:: @@ -1262,9 +1262,10 @@ dictionary and passing the dictionary into ``find_all()`` as the data_soup.find_all(attrs={"data-foo": "value"}) # [<div data-foo="value">foo!</div>] -Similarly for HTML's 'name' attribute, which you can't use as a -keyword argument because Beautiful Soup uses the ``name`` argument to -contain the name of the tag itself. +You can't use a keyword argument to search for HTML's 'name' element, +because Beautiful Soup uses the ``name`` argument to contain the name +of the tag itself. Instead, you can give a value to 'name' in the +``attrs`` argument. name_soup = BeautifulSoup('<input name="email"/>') name_soup.find_all(name="email") |