This commit is contained in:
caiwx86 2023-01-20 02:44:47 +08:00
parent 725a073072
commit b906972585

View File

@ -102,26 +102,26 @@ class baseComic:
@classmethod
def comicChapter(cls,chapter_url,scramble=None,sleep=None):
is_next = True
#try:
is_next = cls.Onechapter(chapter_url,scramble)
try:
is_next = cls.Onechapter(chapter_url,scramble)
#进入下个阶段
if comicInfo.nextExistsGetPath("down_"):
if comicInfo.nextExistsGetPath("down_"):
#章节图片全部下载后,调用下载封面
download_comic_icon()
download_comic_icon()
#下个阶段
if comicInfo.nextExistsGetPath("cbz_"):
time.sleep(0.1)
#下载后自动打包
is_next = CBZUtils.packAutoComicChapterCBZ()
#完成删除原文件
remove_path = comicInfo.getDirComicChapter()
if os.path.exists(remove_path):
shutil.rmtree(remove_path)
print(f"文件已删除: {remove_path}")
#except Exception as e:
# print(e)
# ntfy.sendMsg(f"{comicInfo.getComicName()} 下载出错了")
# is_next = False
if comicInfo.nextExistsGetPath("cbz_"):
time.sleep(0.1)
#下载后自动打包
is_next = CBZUtils.packAutoComicChapterCBZ()
#完成删除原文件
remove_path = comicInfo.getDirComicChapter()
if os.path.exists(remove_path):
shutil.rmtree(remove_path)
print(f"文件已删除: {remove_path}")
except Exception as e:
print(e)
ntfy.sendMsg(f"{comicInfo.getComicName()} 下载出错了")
is_next = False
ntfy.sendMsg(f"预计总章节大小:{cls.count_chapter + 1} / "+ str(comicInfo.getLenChapters()))
comicInfo.setChapterIndex(cls.count_chapter + 1)
if sleep != None and is_next == True: