Although string is for finding strings, you can combine it with arguments that find tags: Beautiful Soup will find all tags whose .string matches your value for string. This code finds the <a> tags whose .string is “ Elsie ”:
soup.find_all("a", string="Elsie")
# [<a href="
http://example.com/elsie" class="sister" id="link1">Elsie</a>]
The string argument is new in Beautiful Soup 4.4.0. In earlier versions it was called text:
soup.find_all("a", text="Elsie")
# [<a href="
http://example.com/elsie" class="sister" id="link1">Elsie</a>]