摘要: def br2_br1(content): content = re.sub('<br>(\s+)<br>', '', content) content = re.sub(r"(<br>)\1+", r"\1", content) content = re.sub("<br>", '<br><br> 阅读全文
posted @ 2023-11-13 09:14 布都御魂 阅读(36) 评论(0) 推荐(0) 编辑
摘要: def update_biaoqian(tag_list, title): if tag_list == [''] or tag_list == []: print('没有标签,取标题作为标签') titless = re.sub('\s', ',', title) tag_list = title 阅读全文
posted @ 2023-11-13 09:13 布都御魂 阅读(9) 评论(0) 推荐(0) 编辑
摘要: def get_all(content, keyword): keys = [] values = [] for specs in keyword: num = keyword.index(specs) keys.append(specs) if num <= len(keyword) - 2: v 阅读全文
posted @ 2023-11-13 09:11 布都御魂 阅读(6) 评论(0) 推荐(0) 编辑
摘要: def del_nt(title_list): title_new = [] for title_old in title_list: title = re.sub('\s', '', title_old) if title == '': pass else: title_new.append(ti 阅读全文
posted @ 2023-11-13 09:07 布都御魂 阅读(10) 评论(0) 推荐(0) 编辑