This commit is contained in:
caiwx86 2022-12-23 21:45:33 +08:00
parent bcecb38dc5
commit ada37c10a1

View File

@ -3,6 +3,9 @@ import requests
class ntfy: class ntfy:
@classmethod @classmethod
def sendMsg(cls, msg): def sendMsg(cls, msg):
print(f"#ntfy: {msg}") try:
requests.post("https://ntfy.caiwenxiu.cn/PyComic", print(f"#ntfy: {msg}")
data=msg.encode(encoding='utf-8')) requests.post("https://ntfy.caiwenxiu.cn/PyComic",
data=msg.encode(encoding='utf-8'))
except:
print(f"#ntfy error: {msg}")