首页
科技
登录
6mi
u
盘
搜
搜 索
科技
scrapy删除html标签
scrapy删除html标签
科技
2023-09-19
101
使用re和w3lib模块
import re from w3lib.html import remove_tags # scrapy移除内容中多余的html标签 @classmethod def go_remove_tag(cls, value): # 移除html标签 value = remove_tags(value) # 移除空格 换行 return re.sub(r'[\t\r\n\s]', '', value)
转载请注明原文地址:https://blackberry.8miu.com/read-26522.html
最新回复
(
0
)