I have a chunk of html extracted with bs4 as following
<div class="a-section a-spacing-small" id="productDescription">
<!-- show up to 2 reviews by default -->
<p>Satin Smooth Universal Protective Wax Pot Collars by Satin Smooth</p>
</div>
To extract the text I was using text.strip()
output.text()
It gave me the output "TypeError: 'str' object is not callable"
While I used output.get_text()
and output.getText()
, I got the desired text
What are the differences between these 3? why the get_text() and getText() is giving the same output?