Use This method to remove html tags from string , working on python 3+.
It removes everything between <>
## -- Remove all html tags
def cleanhtml(raw_html):
cleanr = re.compile('<.*?>')
cleantext = re.sub(cleanr, '', raw_html)
return cleantext
It removes everything between <>
## -- Remove all html tags
def cleanhtml(raw_html):
cleanr = re.compile('<.*?>')
cleantext = re.sub(cleanr, '', raw_html)
return cleantext
No comments:
Post a Comment