0
点赞
收藏
分享

微信扫一扫

python etree.tostring解决xpath显示html标签无乱码

爪哇驿站 2023-03-10 阅读 104


strs = (etree.tostring(content, encoding="utf-8", pretty_print=True, method="html"))

类型是bytes的 如何转换成String呢

strs.decode()

 

举报

相关推荐

0 条评论