我们要进去群里设置
然后获取Webhook
企业自定义文档
https://ding-doc.dingtalk.com/doc#/serverapi2/elzz1p
import requests
import jsondef dindingmag):HEADERS = {"Content-Type": "application/json;charset=utf-8"}key = "access_token"url = "xx/send?access_token=%s" % keydata_info = {'msgtype' : 'text','text' : {'content' : '我想说的话:' + mag},'isAtAll' : True}value = json.dumpsdata_info)response = requests.posturl, data=value, headers=HEADERS)printresponse.status_code)if __name__ == '__main__':msg = '总裁我错了'dindingmsg)