24 Star 119 Fork 56

Thund1r / daily-info

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
index.py 1.22 KB
一键复制 编辑 原始数据 按行查看 历史
'''
Author: thund1r thuncoder@foxmail.com
Date: 2022-08-22 15:41:27
LastEditTime: 2022-09-22 18:01:34
Description: 主程序
Copyright (c) 2022 by thund1r thuncoder@foxmail.com, All Rights Reserved.
'''
# -*- coding: utf8 -*-
import send
import handle
# 腾讯云入口函数
def main_handler(event, context):
show_data = event.get("queryString")
if show_data:
show_html = handle.handle_html(show_data)
return {
"isBase64Encoded": False,
"statusCode": 200,
"headers": {"Content-Type": "text/html"},
"body": show_html
}
else:
res = main()
if res["code"]:
return {
"isBase64Encoded": False,
"statusCode": 200,
"headers": {"Content-Type": "text/html"},
"body": res
}
else:
return {
"isBase64Encoded": False,
"statusCode": 404,
"headers": {"Content-Type": "text/html"},
"body": res
}
# 其他云函数入口
def handler(event, context):
main()
# 主函数
def main():
return send.send_msg()
# 本地运行入口
if __name__ == "__main__":
main()
Python
1
https://gitee.com/thund1r/daily-info.git
git@gitee.com:thund1r/daily-info.git
thund1r
daily-info
daily-info
master

搜索帮助