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
Use
stripped_strings
property:or specify class as empty string (or
None
) and usestring
property: