elem_found = soup.find(elem) # Find element if elem_found: text = elem_found.text # Get text of found element