Answers for "python remove all html tags from text"

3

remove html tags from string python

import re

def cleanhtml(raw_html):
  cleanr = re.compile('<.*?>')
  cleantext = re.sub(cleanr, '', raw_html)
  return cleantext
Posted by: Guest on October-15-2020
0

remove all html tags and text from string python

string = "<p>frwefb</p>"
BeautifulSoup(string, "lxml").text
Posted by: Guest on March-16-2021

Code answers related to "python remove all html tags from text"

Browse Popular Code Answers by Language