You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

Dingtalk.py 577 B

2 years ago
123456789101112131415161718192021222324252627
  1. """
  2. @author: lileilei
  3. @file: Dingtalk.py
  4. @time: 2017/12/26 17:34
  5. """
  6. '''封装钉钉群发消息'''
  7. import requests, json
  8. from config.config import Dingtalk_access_token
  9. def send_ding(content):
  10. url = Dingtalk_access_token
  11. pagrem = {
  12. "msgtype": "text",
  13. "text": {
  14. "content": content
  15. },
  16. "isAtAll": True
  17. }
  18. headers = {
  19. 'Content-Type': 'application/json'
  20. }
  21. f = requests.post(url, data=json.dumps(pagrem), headers=headers)
  22. if f.status_code == 200:
  23. return True
  24. else:
  25. return False

Introduction

生成接口测试报告

No topics

Contributors (2)