human
BeautifulSoup - search by text inside a tag
assistant
Here is some code to beautifulSoup search string 'Elsie' inside tag 'a'

soup.find_all('a', string='Elsie')

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.