Using a regex

cleantext = BeautifulSoup(raw_html, "lxml").text

But it doesn’t prevent you from using external libraries, so I recommend the first solution.

Leave a Comment

tech