fix
This commit is contained in:
1 parent
368538e980
commit
9fd9c65a72
2 files changed
+5
-4
No files matched your search
+4
-3
@@ -2,10 +2,11 @@ import requests
|
|||||||
|
|
||||||
class ntfy:
|
class ntfy:
|
||||||
@classmethod
|
@classmethod
|
||||||
def sendMsg(cls, msg):
|
def sendMsg(cls, msg,alert=True):
|
||||||
try:
|
try:
|
||||||
print(f"#ntfy: {msg}")
|
print(f"#ntfy: {msg}")
|
||||||
requests.post("https://ntfy.caiwenxiu.cn/PyComic",
|
if alert:
|
||||||
data=msg.encode(encoding='utf-8'))
|
requests.post("https://ntfy.caiwenxiu.cn/PyComic",
|
||||||
|
data=msg.encode(encoding='utf-8'))
|
||||||
except:
|
except:
|
||||||
print(f"#ntfy error: {msg}")
|
print(f"#ntfy error: {msg}")
|
||||||
@@ -178,7 +178,7 @@ class comicEntity:
|
|||||||
chapterAPIPath = str(chapterAPIPath).encode('utf-8').decode('unicode_escape')
|
chapterAPIPath = str(chapterAPIPath).encode('utf-8').decode('unicode_escape')
|
||||||
base_url = comicInfo.getBaseUrl(chapter_url)
|
base_url = comicInfo.getBaseUrl(chapter_url)
|
||||||
chapterAPIUrl = base_url+chapterAPIPath
|
chapterAPIUrl = base_url+chapterAPIPath
|
||||||
ntfy.sendMsg(f"chapterApiUrl= {chapterAPIUrl}")
|
ntfy.sendMsg(f"chapterApiUrl= {chapterAPIUrl}",alert=False)
|
||||||
data = htmlUtils.getJSON(chapterAPIUrl)
|
data = htmlUtils.getJSON(chapterAPIUrl)
|
||||||
if data != None:
|
if data != None:
|
||||||
data = data.get("chapter")
|
data = data.get("chapter")
|
||||||
|
|||||||
Reference in new issue
Block a user