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

Function main_handler

BattleForRealMe.py:243–262  ·  view source on GitHub ↗
(event, context)

Source from the content-addressed store, hash-verified

241
242# 兼容云函数
243def main_handler(event, context):
244 global lists
245 for each in lists:
246 if all(each.values()):
247 if checkHT(each):
248 battleForRealMe = BattleForRealMe(each)
249 for count in range(3):
250 try:
251 time.sleep(random.randint(2,5)) # 随机延时
252 battleForRealMe.start()
253 break
254 except requests.exceptions.ConnectionError:
255 notify(f"{battleForRealMe.dic['user']}\t请求失败,随机延迟后再次访问")
256 time.sleep(random.randint(2,5))
257 continue
258 else:
259 notify(f"账号: {battleForRealMe.dic['user']}\n状态: 取消登录\n原因: 多次登录失败")
260 break
261 if not os.path.basename(__file__).split('_')[-1][:-3] in notifyBlackList:
262 send('RealMe积分大乱斗',allMess)
263
264if __name__ == '__main__':
265 main_handler(None,None)

Callers 1

BattleForRealMe.pyFile · 0.70

Calls 5

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

Tested by

no test coverage detected