2024-06-12 21:46:09 发布
网友
我对html2text有问题
input = "<h1 itemprop="name">Bò 33 Món</h1>"
我使用
我的结果呢
B 33 Mn
我需要的结果
Bò 33 món
我该怎么做?在
html2text(input)的结果是Unicode。要使用print打印它,需要将其转换为UTF-8,使其返回到每字符8位:
html2text(input)
print
from stripogram import html2text print html2text(input).encode('utf-8')
会打印出来的
# Bò 33 Món
html2text(input)
的结果是Unicode。要使用print
打印它,需要将其转换为UTF-8,使其返回到每字符8位:会打印出来的
# Bò 33 Món
相关问题 更多 >
编程相关推荐