get the context of a search by keyword 'my keywords' in beautifulsoup `soup`,k = soup.find(text=re.compile('My keywords')).parent.text