import HTMLParser
html_cont = '<abc>'
html_parser = HTMLParser.HTMLParser()
new_cont = html_parser.unescape(html_cont)
print new_cont #new_cont = " <abc>"
import HTMLParser
html_cont = '<abc>'
html_parser = HTMLParser.HTMLParser()
new_cont = html_parser.unescape(html_cont)
print new_cont #new_cont = " <abc>"
本文标题:解析HTML转义
本文链接:https://www.haomeiwen.com/subject/psjbnxtx.html
网友评论