I have an html file:
...
<span class="value">401<span class="Suffix">st</span></span>
...
and I want to get only first span tag text which is 401 but when I run:
>>> get_text = soup.find(class_ = 'value').text
>>> print(get_text)
401st
the output contains inner spans text(st).