I'm trying to get the text from the following html code:
<span id="numrefs">(0)</span>
My code is as follows:
container = soup.findAll("span", {"id":"numrefs"})
print(cotainer)
print(cotainer[0].text)
I think I should be able to get the text, which is (0), using the second print. But the result of my code is as follows:
[<span id="numrefs"></span>]
I could not get any text in the span tag. The second print function returned nothing here. What is happening here?