diff --git a/utils/Ntfy.py b/utils/Ntfy.py index 08b6f66..0a26d77 100644 --- a/utils/Ntfy.py +++ b/utils/Ntfy.py @@ -2,10 +2,11 @@ import requests class ntfy: @classmethod - def sendMsg(cls, msg): + def sendMsg(cls, msg,alert=True): try: print(f"#ntfy: {msg}") - requests.post("https://ntfy.caiwenxiu.cn/PyComic", - data=msg.encode(encoding='utf-8')) + if alert: + requests.post("https://ntfy.caiwenxiu.cn/PyComic", + data=msg.encode(encoding='utf-8')) except: print(f"#ntfy error: {msg}") \ No newline at end of file diff --git a/utils/entity/RouMan.py b/utils/entity/RouMan.py index 32b00aa..7302fd0 100644 --- a/utils/entity/RouMan.py +++ b/utils/entity/RouMan.py @@ -178,7 +178,7 @@ class comicEntity: chapterAPIPath = str(chapterAPIPath).encode('utf-8').decode('unicode_escape') base_url = comicInfo.getBaseUrl(chapter_url) chapterAPIUrl = base_url+chapterAPIPath - ntfy.sendMsg(f"chapterApiUrl= {chapterAPIUrl}") + ntfy.sendMsg(f"chapterApiUrl= {chapterAPIUrl}",alert=False) data = htmlUtils.getJSON(chapterAPIUrl) if data != None: data = data.get("chapter")