Skip to content

Commit

Permalink
Update hpv4g.py
Browse files Browse the repository at this point in the history
在进入秒杀轮询前计算好ECC-HS值,降低轮询执行时间
  • Loading branch information
pyk1998 authored Jan 5, 2021
1 parent 1a8da29 commit be83ca6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions hpv4g.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ def sec_kill_task(miao_miao, req_param, proxy=None):
执行秒杀操作
:return:
"""
#在进入秒杀轮询前计算好ECC-HS值,降低轮询执行时间
miaomiao._headers['ecc-hs'] = MiaoMiao._ecc_hs_header(req_param["seckillId"], req_param["linkmanId"])
_start_time = req_param['startTimeUnx']
# 距秒杀开始300ms 开始执行请求
while _start_time - int(datetime.datetime.now().timestamp() * 1000) > 300:
Expand Down

0 comments on commit be83ca6

Please sign in to comment.