Python语言
提示
python代码使用了requests依赖,如果使用青龙面板请先安装依赖
# 常规使用
# Python语言
#coding:utf-8
import requests
import json
# 通道码/口令码
channel_code = '4d05f4abdb0a0c2a0269900809946903'
head = '测试标题'
body = '测试内容'
url = ''
headers={
'Content-Type': 'application/json'
}
url='https://www.phprm.com/services/push/send/'+channel_code
data={'head':head,'body':body,'url':url}
res=requests.post(headers=headers,url=url,data=json.dumps(data).encode(encoding='utf-8'),timeout=10)
print(json.dumps(res))
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Last Updated: 2025/01/11, 21:35:54