import re
from bs4 import BeautifulSoup as BS
soup = BS(
    """
<a href="/customer-menu/1/accounts/1/update">
    <i class="fa fa-edit"></i> Edit
</a>
"""
    )
links = soup.find_all('a', href='/customer-menu/1/accounts/1/update')
for link in links:
    if link.find(text=re.compile('Edit')):
        thelink = link
break
print(thelink)
BeautifulSoup - поиск по тексту внутри тега