I would like to extract a string from a HTML source with only beautifulsoup. I am trying to extract: "1 van de maximaal 3 actieve reacties" from the following HTML:
<span class="titel ng-scope" translate="ReactiesTitel-Titel-actieve" translate-values="getTranslationValues()">1 van de maximaal 3 actieve reacties</span>
My current code retrieves the entire span class, but I cannot find out how I can only extract the string, without the use of .split or some sort of string manipulation.
Current code:
html = driver.page_source
soup = BeautifulSoup(html, 'html.parser')
x = soup.find('span', {'class':'titel ng-scope'})
print(x)