Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
ffm-baseline
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ML
ffm-baseline
Commits
dafab6d9
Commit
dafab6d9
authored
Mar 11, 2019
by
张彦钊
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of git.wanmeizhensuo.com:ML/ffm-baseline
修改ctr wgt
parents
264fdefa
b1ae44f0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
0 deletions
+27
-0
dingding_robot.py
eda/recommended_indexs/dingding_robot.py
+27
-0
No files found.
eda/recommended_indexs/dingding_robot.py
0 → 100644
View file @
dafab6d9
# coding: utf-8
import
json
import
requests
def
dingding_robot
(
data
):
# 机器人的webhooK 获取地址参考:https://open-doc.dingtalk.com/microapp/serverapi2/qf2nxq
webhook
=
"https://oapi.dingtalk.com/robot/send?access_token=5131b887f6b022150f903e9d690e08c0d481fba844545034aaf48906ee026fa0"
headers
=
{
'content-type'
:
'application/json'
}
# 请求头
r
=
requests
.
post
(
webhook
,
headers
=
headers
,
data
=
json
.
dumps
(
data
))
r
.
encoding
=
'utf-8'
return
(
r
.
text
)
if
__name__
==
"__main__"
:
# 请求参数 可以写入配置文件中
data
=
{
"msgtype"
:
"text"
,
"text"
:
{
"content"
:
"群机器人是钉钉群的高级扩展功能。群机器人可以将第三方服务的信息聚合到群聊中,实现自动化的信息同步。"
,
"title"
:
"自定义机器人"
# "picUrl": "",
# "messageUrl": "https://www.baidu.com/"
}
}
res
=
dingding_robot
(
data
)
print
(
res
)
# 打印请求结果
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment