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