How to extract values with BeautifulSoup with no class
问题 html code : <td class="_480u"> <div class="clearfix"> <div> Female </div> </div> </td> I wanted the value "Female" as an output. I tried bs.findAll('div',{'class':'clearfix'}) ; bs.findAll('tag',{'class':'_480u'}) But these classes are all over my html code and the output is a big list. I wanted to incorporate {td --> class = ".." and div --> class = ".."} in my search, so that I get the output as Female. How can I do this? Thanks 回答1: Use stripped_strings property: >>> from bs4 import