Commit 83c9efd5 by 陈森彬

切换微信告警机器人

parent e1694208
Showing with 4 additions and 3 deletions
...@@ -6,16 +6,17 @@ import requests ...@@ -6,16 +6,17 @@ import requests
dd_robot_api = ' https://oapi.dingtalk.com/robot/send?access_token=' dd_robot_api = ' https://oapi.dingtalk.com/robot/send?access_token='
tom = 'c19beeab837f5c6e019e7fc602d470704d634ae33510f40fb0e903cde215fb24' tom = 'c19beeab837f5c6e019e7fc602d470704d634ae33510f40fb0e903cde215fb24'
wechat_robot_api = "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key="
tom_key = "bb2b5b4e-9a06-4d3d-89f5-61bcf07ed4ba"
def dd_send_msg(msg, robot=tom_key):
def dd_send_msg(msg, robot=tom):
data = { data = {
"msgtype": "text", "msgtype": "text",
"text": { "text": {
"content": msg "content": msg
} }
} }
requests.post(dd_robot_api + robot, json=data) requests.post(wechat_robot_api + robot, json=data)
time.sleep(5) time.sleep(5)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment