安装库命令如下
pip install htmlmin
使用方法
htmlmin.minify(data['html'].encode('utf-8').decode('utf- 8'),remove_all_empty_space=True))
data[‘html’]是我从redis所取数据
安装库命令如下
pip install htmlmin
使用方法
htmlmin.minify(data['html'].encode('utf-8').decode('utf- 8'),remove_all_empty_space=True))
data[‘html’]是我从redis所取数据