diff --git a/utils/entity/RouMan.py b/utils/entity/RouMan.py index be8d713..f57652a 100644 --- a/utils/entity/RouMan.py +++ b/utils/entity/RouMan.py @@ -145,13 +145,12 @@ class comicEntity: is_next = cls.comicChapterDownload(chapter_url) comicInfo.nextInfoToImgChapter() #下载完成后, 开始解密图片 - if scramble: + chapter_dir = comicInfo.getDirComicChapter() + if scramble and os.path.exists(chapter_dir): #获取章节图片路径 - chapter_dir = comicInfo.getDirComicChapter() dirs = os.listdir(chapter_dir) for img in dirs: - isScramble = str(img).startswith("scramble=") - if isScramble: + if img.startswith("scramble="): c_path = os.path.join(chapter_dir, img) #imageUtils.getScrambleImage(c_path) imageUtils.encode_scramble_image(c_path)