import requests url = "https://oapi.dingtalk.com/robot/send?access_token=8c4c99b4b2ca152fb0a5f21b368fae743a64b4ccecac01548a8620fe7f63a0ca" headers = {'Content-Type': 'application/json;charset=utf-8'} def send(msg): data = {'msgtype': 'text', "at": {"isAtAll": True, "atMobiles": []}, "text": {"content": "[代码发布]"+msg}} requests.post(url=url, headers=headers, json=data) if __name__ == '__main__': send("双击打开撒就发了") # 发送的内容得加上趣程