This commit is contained in:
cwx committed 2022-12-23 00:49:12 +08:00
1 parent 775c0c996f
commit bcecb38dc5
1 file changed
+13 -12
+13 -12
View File
@@ -109,23 +109,24 @@ class comicEntity:
@classmethod @classmethod
def comicChapter(cls,chapter_url,scramble=None,sleep=None): def comicChapter(cls,chapter_url,scramble=None,sleep=None):
is_next = True is_next = True
is_next = cls.Onechapter(chapter_url,scramble) try:
is_next = cls.Onechapter(chapter_url,scramble)
#进入下个阶段 #进入下个阶段
if comicInfo.nextExistsGetPath("down_"): if comicInfo.nextExistsGetPath("down_"):
#章节图片全部下载后,调用下载封面 #章节图片全部下载后,调用下载封面
netUtils.downloadComicIcon() netUtils.downloadComicIcon()
#下个阶段 #下个阶段
if comicInfo.nextExistsGetPath("cbz_"): if comicInfo.nextExistsGetPath("cbz_"):
time.sleep(0.1) time.sleep(0.1)
#下载后自动打包 #下载后自动打包
is_next = CBZUtils.packAutoComicChapterCBZ() is_next = CBZUtils.packAutoComicChapterCBZ()
#完成删除原文件 #完成删除原文件
remove_path = comicInfo.getDirComicChapter() remove_path = comicInfo.getDirComicChapter()
shutil.rmtree(remove_path) shutil.rmtree(remove_path)
print(f"文件已删除: {remove_path}") print(f"文件已删除: {remove_path}")
#except: except:
# ntfy.sendMsg(f"{comicInfo.getComicName()} 下载出错了") ntfy.sendMsg(f"{comicInfo.getComicName()} 下载出错了")
# is_next = False is_next = False
ntfy.sendMsg(f"预计总章节大小:{cls.count_chapter + 1} / "+ str(comicInfo.getLenChapters())) ntfy.sendMsg(f"预计总章节大小:{cls.count_chapter + 1} / "+ str(comicInfo.getLenChapters()))
if sleep != None and is_next == True: if sleep != None and is_next == True:
ntfy.sendMsg(f"{sleep} 秒后开始下载下一个章节") ntfy.sendMsg(f"{sleep} 秒后开始下载下一个章节")