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

Function main_handler

TimingCash.py:165–184  ·  view source on GitHub ↗
(event, context)

Source from the content-addressed store, hash-verified

163
164# 兼容云函数
165def main_handler(event, context):
166 global lists
167 for each in lists:
168 if all(each.values()):
169 if checkHT(each):
170 timingCash = TimingCash(each)
171 for count in range(3):
172 try:
173 time.sleep(random.randint(2,5)) # 随机延时
174 timingCash.start()
175 break
176 except requests.exceptions.ConnectionError:
177 notify(f"{timingCash.dic['user']}\t请求失败,随机延迟后再次访问")
178 time.sleep(random.randint(2,5))
179 continue
180 else:
181 notify(f"账号: {timingCash.dic['user']}\n状态: 取消登录\n原因: 多次登录失败")
182 break
183 if not os.path.basename(__file__).split('_')[-1][:-3] in notifyBlackList:
184 send('欢太定时现金',allMess)
185
186if __name__ == '__main__':
187 main_handler(None,None)

Callers 1

TimingCash.pyFile · 0.70

Calls 5

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

Tested by

no test coverage detected