码迷,mamicode.com
首页 > 编程语言 > 详细

python清除html的标签

时间:2018-10-16 22:08:35      阅读:443      评论:0      收藏:0      [点我收藏+]

标签:spark   href   widget   tag   corn   pip   value   proxy   undefined   

操作步骤:

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的标签

标签:spark   href   widget   tag   corn   pip   value   proxy   undefined   

原文地址:https://www.cnblogs.com/stone1989/p/9800521.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!