fix
This commit is contained in:
parent
368538e980
commit
9fd9c65a72
@ -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}")
|
||||
@ -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")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user