的代码。
这是一个简单的python代码,可以用来推送企业微信消息:
import requests
def send_message(text):
url = "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=YOUR_KEY"
headers = {"Content-Type": "application/json"}
data = {
"msgtype": "text",
"text": {
"content": text