Files
ZFScoresCheck/pushplus.py
T
2024-01-30 23:51:00 +08:00

13 lines
369 B
Python

import requests
import json
def send_message(token, title, content):
url = "http://www.pushplus.plus/send"
data = {"token": token, "title": title, "content": content}
body = json.dumps(data).encode(encoding="utf-8")
headers = {"Content-Type": "application/json"}
response = requests.post(url, data=body, headers=headers)
return response.text