Hi,
I am trying to extract a NavigableString object from html.
The idea is to be able to further manipulate it with string.replace_with("new string")
In the following example everything works fine
from bs4 import BeautifulSoupHowever if html code itself contains line breaks, then NavigableString is not extracted, instead a None is returned
from bs4 import BeautifulSoupSo, the question is how to extract a NavigableString, if html code contains line breaks. I know that get_text(strip=True) will work, but it will return just a text, not a NavigableString, so I will not be able to further manipulate it.