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)
posted @ 2018-10-16 20:42  石Stone头  阅读(2518)  评论(0编辑  收藏  举报