python清除html的标签
Posted Stone
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了python清除html的标签相关的知识,希望对你有一定的参考价值。
操作步骤:
pip2.7 install w3lib
python2.7
from w3lib.html import remove_tags
a="""["<a href=‘/cluster/app/application_1514348141878_2816407‘>application_1514348141878_2816407</a>","aaaaaa","com.aaa.sem.LandPageCount2","SPARK","root.aaa_aaaaa_group","55680","1539600524933","0","RUNNING","UNDEFINED","<br title=‘10.0‘> <div class=‘ui-progressbar ui-widget ui-widget-content ui-corner-all‘ title=‘10.0%‘> <div class=‘ui-progressbar-value ui-widget-header ui-corner-left‘ style=‘width:10.0%‘> </div> </div>","<a href=‘http://d160.nc.xin.com:8088/proxy/application_1514348141878_2816407/‘>ApplicationMaster</a>"]"""
remove_tags(a)
以上是关于python清除html的标签的主要内容,如果未能解决你的问题,请参考以下文章