上一页 1 2 3 4 5 6 7 ··· 25 下一页
摘要: def clean_title_source_date(s): # 使用正则表达式去除回车符、制表符、换行符、全角空格和非断行空白符 cleaned = re.sub(r'[ \r\t\n\u3000\xa0来源:]', '', s) return cleaned 阅读全文
posted @ 2024-08-28 10:16 布都御魂 阅读(21) 评论(0) 推荐(0)
摘要: # 把结果复制到MongoDB compass上的查询位置# 点击export data# 点击Export query results# Select fields in table 选择需要导出的字段# 导出last=open('spider.results_dangdang.csv','r', 阅读全文
posted @ 2024-07-10 16:27 布都御魂 阅读(130) 评论(0) 推荐(0)
摘要: import rea = """sdfkhellolsdlfsdfiooefo:877898989worldafdsf"""b = re.findall('hello(.*?)world',a)c = re.findall('hello(.*?)world',a,re.S)print ('b is 阅读全文
posted @ 2024-06-24 17:04 布都御魂 阅读(14) 评论(0) 推荐(0)
摘要: # 流冠IP获取代理 # 提取订单 """ orderId:提取订单号 secret:用户密钥 num:提取IP个数 pid:省份 cid:城市 type:请求类型,1=http/https,2=socks5 unbindTime:使用时长,秒/s为单位 noDuplicate:去重,0=不去重,1 阅读全文
posted @ 2024-03-22 09:08 布都御魂 阅读(54) 评论(0) 推荐(0)
摘要: 错误信息:File doesn't exist Arg_ParamName_Name 修改编发:把文件名改成从根目录开始 阅读全文
posted @ 2024-03-05 10:20 布都御魂 阅读(149) 评论(0) 推荐(0)
摘要: 随便新建一列 在第一行写上=rand(),确定,生成一个小数 鼠标悬浮在第一行右下角,出现黑色加黑的+,双击,点击排序,随便选一个排序方式 阅读全文
posted @ 2023-12-06 15:12 布都御魂 阅读(266) 评论(0) 推荐(0)
摘要: 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 布都御魂 阅读(46) 评论(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 布都御魂 阅读(20) 评论(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 布都御魂 阅读(12) 评论(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 布都御魂 阅读(16) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 ··· 25 下一页