(event, context)
| 241 | |
| 242 | # 兼容云函数 |
| 243 | def 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 | |
| 264 | if __name__ == '__main__': |
| 265 | main_handler(None,None) |
no test coverage detected