Files
xiaoxiang/流程
T
2026-04-15 18:12:30 +08:00

70 lines
1.8 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
多线程
流程_多线程文件夹下有流程
让ai代写的,不确定是否可用
下面流程都是单线程,修改点太多了,多线程还未修改
小象验证码大概4,5后白屏无法加载
1.小象超市分类请求部分.py 将分类数据保存到sql
需注意
shop_id = 10000900 店铺id
format_today work_id
2.小象超市详情列表请求部分.py
2.1
all_one部分
format_today = str(datetime.date.today()).replace("-","")+'tk' work_id
shop_id = 10000900 店铺id
# 40581
one_ids=[
40532 所需列表的一级id(需要去tk_test数据库category_detail表拿one_id)
]
for one_id in one_ids:
all_one(shop_id,one_id,format_today)
2.2
# one_all是分类跑满
# 跑的时候打开下面的就行
# while 1:
# if one_all(shop_id,format_today)==0:
# print(728)
# # time.sleep(random.randint(3,15))
# else:break
3.小象超市详情补采部分.py
# 注意这俩
format_today = str(datetime.date.today()).replace("-", "") + 'tk' work_id
shop_id = 10000900 店铺id
(未添加补跑字段,就是不知道跑到哪如果中断的话)
4.数据拿取id版.py
# 清洗数据入库
所需导出sql
# f_id是一级分类id看需求添加
SELECT *
FROM data_completed
WHERE id IN (
SELECT MAX(id)
FROM data_completed
WHERE work_id = '20260329tk' AND f_id='40532' --这里是单个检查
GROUP BY
work_id, goods_id, s_id, station_id, `desc`,
f_id, f_name, goods_tag, image, is_immediate,
original_price, price, price_tag, s_name, shop_id,
t_id, t_name, title, token, vip_price
);
这个查出来就是去重后的,这个才是老板要的数据