content = """<html><a href="http://www.not-this-one.com"></a>
<a href="http://www.somewebsite.com"></a><p>other stuff</p><p>sales</p>
</html>
"""
doc = LH.fromstring(content)
for url in doc.xpath(
    """
    //*[contains(text(),"sales")]
    /preceding::*[starts-with(@href,"http")][1]/@href"""
    ):
    print(url)
Using Regex to Search for HTML links near keywords