python过滤html 标签

dr =re.compile(r'<[^>]+>',re.S)# line =re.sub(dr,'',line)其中line为内容返回line 则是去掉标签的纯文字内容

你可能感兴趣的:(python)