企业微信群机器人SDK Python版
#!/usr/bin/python3
# -*- coding: utf-8 -*-
#微信企业号API Python3版
import time,datetime
import requests
import json
class WXQY:
apiurl = "https://qyapi.weixin.qq.com/cgi-bin/"
def __init__(self):
pass
# 发送消息,群机器人
def send_message_group(self, key, type, data):
if not key or not data: #数据为空
return
params = {
'msgtype' : type,
}
if type == "text":
params[type] = {
'content' : data}
elif type == "markdown"