MCPcopy Create free account
hub / github.com/Mashiro2000/HeyTapTask / main_handler

Function main_handler

Double11.py:316–335  ·  view source on GitHub ↗
(event, context)

Source from the content-addressed store, hash-verified

314
315# 兼容云函数
316def main_handler(event, context):
317 global lists
318 for each in lists:
319 if all(each.values()):
320 if checkHT(each):
321 double11 = Double11(each)
322 for count in range(3):
323 try:
324 time.sleep(random.randint(2,5)) # 随机延时
325 double11.start()
326 break
327 except requests.exceptions.ConnectionError:
328 notify(f"{double11.dic['user']}\t请求失败,随机延迟后再次访问")
329 time.sleep(random.randint(2,5))
330 continue
331 else:
332 notify(f"账号: {double11.dic['user']}\n状态: 取消登录\n原因: 多次登录失败")
333 break
334 if not os.path.basename(__file__).split('_')[-1][:-3] in notifyBlackList:
335 send('全名抽免单',allMess)
336
337if __name__ == '__main__':
338 main_handler(None,None)

Callers 1

Double11.pyFile · 0.70

Calls 5

startMethod · 0.95
sendFunction · 0.90
Double11Class · 0.85
checkHTFunction · 0.70
notifyFunction · 0.70

Tested by

no test coverage detected