fix
This commit is contained in:
1 parent
69a3a75808
commit
33121ce960
1 file changed
+10
-13
+10
-13
@@ -136,7 +136,10 @@ class comicEntity:
|
|||||||
def Onechapter(cls,chapter_url,scramble=None):
|
def Onechapter(cls,chapter_url,scramble=None):
|
||||||
if not str(chapter_url).startswith("http"):
|
if not str(chapter_url).startswith("http"):
|
||||||
chapter_url = comicInfo.getBaseUrl() + chapter_url
|
chapter_url = comicInfo.getBaseUrl() + chapter_url
|
||||||
is_next = cls.comicChapterDownload(chapter_url)
|
try:
|
||||||
|
is_next = cls.comicChapterDownload(chapter_url)
|
||||||
|
except:
|
||||||
|
is_next = cls.comicChapterDownload(chapter_url,True)
|
||||||
comicInfo.nextInfoToImgChapter()
|
comicInfo.nextInfoToImgChapter()
|
||||||
#下载完成后, 开始解密图片
|
#下载完成后, 开始解密图片
|
||||||
if scramble:
|
if scramble:
|
||||||
@@ -153,8 +156,8 @@ class comicEntity:
|
|||||||
return is_next
|
return is_next
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def comicChapterDownload(cls,chapter_url):
|
def comicChapterDownload(cls,chapter_url,update):
|
||||||
x = cls.baseComicData(chapter_url)
|
x = cls.baseComicData(chapter_url,update)
|
||||||
bookName = x.get("bookName")
|
bookName = x.get("bookName")
|
||||||
chapterName = x.get("chapterName")
|
chapterName = x.get("chapterName")
|
||||||
#fileUtils.saveConfComicChapterInfo(chapterName,x,bookName)
|
#fileUtils.saveConfComicChapterInfo(chapterName,x,bookName)
|
||||||
@@ -175,16 +178,10 @@ class comicEntity:
|
|||||||
if chapterAPIPath != None:
|
if chapterAPIPath != None:
|
||||||
base_url = comicInfo.getBaseUrl(chapter_url)
|
base_url = comicInfo.getBaseUrl(chapter_url)
|
||||||
chapterAPIUrl = base_url+chapterAPIPath
|
chapterAPIUrl = base_url+chapterAPIPath
|
||||||
try:
|
data = htmlUtils.getJSON(chapterAPIUrl)
|
||||||
data = htmlUtils.getJSON(chapterAPIUrl)
|
data = data.get("chapter")
|
||||||
data = data.get("chapter")
|
chapterName = data.get("name")
|
||||||
chapterName = data.get("name")
|
images = data.get("images")
|
||||||
images = data.get("images")
|
|
||||||
except:
|
|
||||||
htmlUtils.remove_HtmlCache(chapter_url)
|
|
||||||
htmlUtils.remove_HtmlCache(chapterAPIUrl)
|
|
||||||
ntfy.sendMsg("存在错误,尝试中")
|
|
||||||
cls.comicChapterDownload(chapter_url)
|
|
||||||
if images == None:
|
if images == None:
|
||||||
ntfy.sendMsg(f"未获取到章节图像 comic_name={bookName} chapter={chapterName}")
|
ntfy.sendMsg(f"未获取到章节图像 comic_name={bookName} chapter={chapterName}")
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user