| 322 | |
| 323 | # 兼容云函数 |
| 324 | def 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 | |
| 345 | if __name__ == '__main__': |
| 346 | main_handler(None,None) |