MihoyoBBSTools/index.py

22 lines
534 B
Python
Raw Normal View History

2021-06-13 11:39:56 +00:00
import main
2022-01-10 13:07:30 +00:00
import push
2021-06-13 11:39:56 +00:00
import main_multi
2022-01-10 13:07:30 +00:00
from error import CookieError
2021-06-13 11:39:56 +00:00
2021-10-25 14:53:34 +00:00
def main_handler(event: dict, context: dict):
2022-01-10 13:07:30 +00:00
try:
status_code = main.main()
except CookieError:
status_code = 0
push.push(status_code, "脚本已执行")
2021-06-13 11:39:56 +00:00
print("云函数测试支持!")
return 0
2021-10-25 14:53:34 +00:00
def main_handler_mulit(event: dict, context: dict):
# 多用户需要传递True表示自动执行不需要手动进行确认
2021-06-13 11:39:56 +00:00
main_multi.main_multi(True)
print("云函数多用户测试支持!")
return 0