Find elements which have a specific child with BeautifulSoup
问题 With BeautifulSoup, how to access to a <li> which has a specific div as child? Example: How to access to the text (i.e. info@blah.com) of the li which has Email as child div? <li> <div>Country</div> Germany </li> <li> <div>Email</div> info@blah.com </li> I tried to do it manually: looping on all li , and for each of them, relooping on all child div to check if text is Email, etc. but I'm sure there exists a more clever version with BeautifulSoup. 回答1: There are multiple ways to approach the