From e09b5eff12317aa83d88c0e34dbe8a86f74ce8f7 Mon Sep 17 00:00:00 2001 From: caiwx86 Date: Fri, 31 Mar 2023 11:16:36 +0800 Subject: [PATCH] fix --- utils/base/BaseComicEntity.py | 4 ++-- utils/comic/ComicInfo.py | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/utils/base/BaseComicEntity.py b/utils/base/BaseComicEntity.py index 5c3f218..ca59483 100644 --- a/utils/base/BaseComicEntity.py +++ b/utils/base/BaseComicEntity.py @@ -54,7 +54,7 @@ class baseComic: #存在完成配置文件 但文件不存在 将清空完成配置文件 if ci.isProgress(ci.PROGRESS_DONE) and not fu.exists(ci.getNewCBZComicChapter("file")): ci.isProgress(ci.PROGRESS_DONE,remove=True) #不存在完成配置文件 则允许下载 - if not ci.isProgress(ci.PROGRESS_DONE): cls.comicChapters(href,scramble=True,sleep=random.randint(5,15)) + if not ci.isProgress(ci.PROGRESS_DONE): cls.comicChapters(href,scramble=True,sleep=random.randint(1,5)) cls.count_chapter += 1 #一本漫画下载后等待 #清空文件夹 @@ -131,7 +131,7 @@ class baseComic: download_images(list_img,ci.getDirComicChapter(), files_name=files_name,concurrency=None,timeout=10) equ_next = len(",".join(os.listdir(ci.getDirComicChapter())).split(".jpg"))-1 == len(list_img) if not equ_next: - sleep_time = 3+int(repeat)*2 + sleep_time = int(repeat)*2 time.sleep(sleep_time) ntfy.sendMsg(f"下载数据(不完整,{sleep_time}秒钟后尝试第{repeat}次") repeat += 1 diff --git a/utils/comic/ComicInfo.py b/utils/comic/ComicInfo.py index 5b3e00d..1d9f952 100644 --- a/utils/comic/ComicInfo.py +++ b/utils/comic/ComicInfo.py @@ -3,6 +3,7 @@ import os,re from utils.comic.PathStr import pathStr import json,shutil from utils.FileUtils import dbUtils +from opencc import OpenCC class comicInfo(): COMIC_ICON_NAME = "000" @@ -15,7 +16,7 @@ class comicInfo(): PROGRESS_NONE = "none" IS_NEW_ICON = False - + document = Document() path_comic_info = None