Use python to automatically send messages to enterprise WeChat robots

def test_004_robot(self):
   headers = {"Content-Type": "text/plain"}
   s="卖品,打印码:{},验证码{}".format({str(printCode)},{str(verifyCode)})
   data = {
      "msgtype": "text",
      "text": {
         "content": s,
      }
   }
   r = requests.post(
      url='https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=d7786b44-84d3-400a-a018-999999999999',
      headers=headers, json=data)
   print(r.text)

Guess you like

Origin blog.csdn.net/qq_43422918/article/details/92798409