我是Python的新手,搞不懂这一点。我有一个html字符串存储为myHtmlString,但get错误:需要unicode参数,而get为str。我试图缩小html字符串和删除多余的空格。在
import htmlmin
myHtmlString ="""<body style="background-color: tomato;">
<h1> htmlmin rocks</h1>
<pre>
and rolls
</pre>
</body>"""
myHtmlString2 = htmlmin.minify(myHtmlString, remove_empty_space=True)
明白了:
相关问题 更多 >
编程相关推荐