“Remova as tags HTML da String python” Respostas de código

Remova as tags HTML da String python

import re

def cleanhtml(raw_html):
  cleanr = re.compile('<.*?>')
  cleantext = re.sub(cleanr, '', raw_html)
  return cleantext
Tame Tapir

Python Remova tags HTML

from bs4 import BeautifulSoup

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

Remova todas as tags HTML e texto da String Python

string = "<p>frwefb</p>"
BeautifulSoup(string, "lxml").text
TheRubberDucky

Respostas semelhantes a “Remova as tags HTML da String python”

Perguntas semelhantes a “Remova as tags HTML da String python”

Mais respostas relacionadas para “Remova as tags HTML da String python” em HTML

Procure respostas de código populares por idioma

Procurar outros idiomas de código