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:
@classmethod
def sendMsg(cls, msg):
print(f"#ntfy: {msg}")
requests.post("https://ntfy.caiwenxiu.cn/PyComic",
data=msg.encode(encoding='utf-8'))
try:
print(f"#ntfy: {msg}")
requests.post("https://ntfy.caiwenxiu.cn/PyComic",
data=msg.encode(encoding='utf-8'))
except:
print(f"#ntfy error: {msg}")