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

Function main_handler

ChockInEarly.py:138–157  ·  view source on GitHub ↗
(event, context)

Source from the content-addressed store, hash-verified

136
137# 兼容云函数
138def main_handler(event, context):
139 global lists
140 for each in lists:
141 if all(each.values()):
142 if checkHT(each):
143 checkInEarly = CheckInEarly(each)
144 for count in range(3):
145 try:
146 time.sleep(random.randint(2,5)) # 随机延时
147 checkInEarly.start()
148 break
149 except requests.exceptions.ConnectionError:
150 notify(f"{checkInEarly.dic['user']}\t请求失败,随机延迟后再次访问")
151 time.sleep(random.randint(2,5))
152 continue
153 else:
154 notify(f"账号: {checkInEarly.dic['user']}\n状态: 取消登录\n原因: 多次登录失败")
155 break
156 if not os.path.basename(__file__).split('_')[-1][:-3] in notifyBlackList:
157 send('欢太早睡打卡',allMess)
158
159if __name__ == '__main__':
160 main_handler(None,None)

Callers 1

ChockInEarly.pyFile · 0.70

Calls 5

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

Tested by

no test coverage detected