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

Function main_handler

DailyCash.py:324–343  ·  view source on GitHub ↗
(event, context)

Source from the content-addressed store, hash-verified

322
323# 兼容云函数
324def main_handler(event, context):
325 global lists
326 for each in lists:
327 if all(each.values()):
328 if checkHT(each):
329 dailyCash = DailyCash(each)
330 for count in range(3):
331 try:
332 time.sleep(random.randint(2,5)) # 随机延时
333 dailyCash.start()
334 break
335 except requests.exceptions.ConnectionError:
336 notify(f"{dailyCash.dic['user']}\t请求失败,随机延迟后再次访问")
337 time.sleep(random.randint(2,5))
338 continue
339 else:
340 notify(f"账号: {dailyCash.dic['user']}\n状态: 取消登录\n原因: 多次登录失败")
341 break
342 if not os.path.basename(__file__).split('_')[-1][:-3] in notifyBlackList:
343 send('欢太每日现金',allMess)
344
345if __name__ == '__main__':
346 main_handler(None,None)

Callers 1

DailyCash.pyFile · 0.70

Calls 5

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

Tested by

no test coverage detected