🌤️ 加载中...
#
Python 2021-07-16

py3使用钉钉webhook机器人通知

By Jove 0 Views 2 MIN READ 0 Comments

#!/usr/bin/python3
import requests
import json
import warnings
warnings.filterwarnings('ignore')


headers = {
            "Content-Type": "application/json; charset=utf-8"
           }
dingding_url= "https://oapi.dingtalk.com/robot/send?access_token=xxxxxxxxxoxoxoxooxoxoxoxoxooxoxoxoxox"

dingding_json = {"msgtype":"text",
                        "text":{
                                "content":"要带有钉钉自定义的关键字和主体通知内容",
                        }
                }
dingding_data = json.dumps(dingding_json)
dingding = requests.post(dingding_url,dingding_data,headers=headers,timeout=100)

本文由 Jove 原创

采用 CC BY-NC-SA 4.0 协议进行许可

转载请注明出处:https://www.jozxing.cc/index.php/archives/1986/

TAGS: 无标签

相关推荐

  • 暂无相关推荐,看看别的吧。

0 评论