[feat] 多个通道同时推送

This commit is contained in:
yhy 2022-07-19 17:04:20 +08:00
parent 68c1b9c78c
commit 571a825664

View File

@ -357,11 +357,11 @@ def send_body(url,query_pushed_at,query_tag_name):
body = "工具名称:" + tools_name + "\r\n" + "工具地址:" + download_url + "\r\n" + "工具更新日志:" + "\r\n" + update_log
if load_config()[0] == "dingding":
dingding(text, body,load_config()[2],load_config()[3])
elif load_config()[0] == "server":
if load_config()[0] == "server":
server(text, body,load_config()[2])
elif load_config()[0] == "pushplus":
if load_config()[0] == "pushplus":
pushplus(text, body,load_config()[2])
elif load_config()[0] == "tgbot":
if load_config()[0] == "tgbot":
tgbot(text,body,load_config()[2],load_config()[3])
conn = sqlite3.connect('data.db')
cur = conn.cursor()
@ -386,13 +386,13 @@ def send_body(url,query_pushed_at,query_tag_name):
body = "工具名称:" + tools_name + "\r\n" + "更新详情地址:" + download_url + "\r\n" + "commit更新日志" + "\r\n" + update_log
if load_config()[0] == "dingding":
dingding(text, body,load_config()[2],load_config()[3])
elif load_config()[0] == "feishu":
if load_config()[0] == "feishu":
feishu(text,body,load_config()[2])
elif load_config()[0] == "server":
if load_config()[0] == "server":
server(text, body,load_config()[2])
elif load_config()[0] == "pushplus":
if load_config()[0] == "pushplus":
pushplus(text, body,load_config()[2])
elif load_config()[0] == "tgbot":
if load_config()[0] == "tgbot":
tgbot(text,body,load_config()[2],load_config()[3])
conn = sqlite3.connect('data.db')
cur = conn.cursor()
@ -414,13 +414,13 @@ def send_body(url,query_pushed_at,query_tag_name):
body = "工具名称:" + tools_name + "\r\n" + "工具地址:" + download_url + "\r\n" + "commit更新日志" + "\r\n" + update_log
if load_config()[0] == "dingding":
dingding(text, body, load_config()[2], load_config()[3])
elif load_config()[0] == "feishu":
if load_config()[0] == "feishu":
feishu(text,body,load_config[2])
elif load_config()[0] == "server":
if load_config()[0] == "server":
server(text, body, load_config()[2])
elif load_config()[0] == "pushplus":
if load_config()[0] == "pushplus":
pushplus(text, body,load_config()[2])
elif load_config()[0] == "tgbot":
if load_config()[0] == "tgbot":
tgbot(text, body, load_config()[2], load_config()[3])
conn = sqlite3.connect('data.db')
cur = conn.cursor()
@ -552,16 +552,16 @@ def sendNews(data):
if load_config()[0] == "dingding":
dingding(text, body, load_config()[2], load_config()[3])
print("钉钉 发送 CVE 成功")
elif load_config()[0] == "feishu":
if load_config()[0] == "feishu":
feishu(text, body, load_config()[2])
print("飞书 发送 CVE 成功")
elif load_config()[0] == "server":
if load_config()[0] == "server":
server(text, body, load_config()[2])
print("server酱 发送 CVE 成功")
elif load_config()[0] == "pushplus":
if load_config()[0] == "pushplus":
pushplus(text, body, load_config()[2])
print("pushplus 发送 CVE 成功")
elif load_config()[0] == "tgbot":
if load_config()[0] == "tgbot":
tgbot(text, body, load_config()[2], load_config()[3])
print("tgbot 发送 CVE 成功")
except IndexError:
@ -581,16 +581,16 @@ def sendKeywordNews(keyword, data):
if load_config()[0] == "dingding":
dingding(text, body, load_config()[2], load_config()[3])
print("钉钉 发送 CVE 成功")
elif load_config()[0] == "feishu":
if load_config()[0] == "feishu":
feishu(text, body, load_config()[2])
print("飞书 发送 CVE 成功")
elif load_config()[0] == "server":
if load_config()[0] == "server":
server(text, body, load_config()[2])
print("server酱 发送 CVE 成功")
elif load_config()[0] == "pushplus":
if load_config()[0] == "pushplus":
pushplus(text, body, load_config()[2])
print("pushplus 发送 CVE 成功")
elif load_config()[0] == "tgbot":
if load_config()[0] == "tgbot":
tgbot(text, body, load_config()[2], load_config()[3])
print("tgbot 发送 CVE 成功")
except IndexError: