From 44a4d2c28f7e978a8eff6c69bc3b058bde5e1eb6 Mon Sep 17 00:00:00 2001 From: caiwx86 Date: Sat, 1 Apr 2023 12:31:40 +0800 Subject: [PATCH] fix --- utils/HtmlUtils.py | 2 +- utils/base/BaseComicEntity.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/HtmlUtils.py b/utils/HtmlUtils.py index 3b69693..2c79b74 100644 --- a/utils/HtmlUtils.py +++ b/utils/HtmlUtils.py @@ -64,7 +64,7 @@ class htmlUtils: else: url_text = None while url_text == None: print(f"请求地址:{curl}") - res = s.get(curl,stream=True, headers=cls.headers, timeout=10,allow_redirects=True) + res = s.get(curl,stream=True, headers=cls.headers, timeout=5,allow_redirects=True) if type == "bytes": url_text = res if type == "json": diff --git a/utils/base/BaseComicEntity.py b/utils/base/BaseComicEntity.py index 5175ebf..f2c6125 100644 --- a/utils/base/BaseComicEntity.py +++ b/utils/base/BaseComicEntity.py @@ -127,7 +127,7 @@ class baseComic: repeat = 1 while is_next and repeat <= 10 and not CBZUtils.updateOldCBZ(files_name): ntfy.sendMsg(f"{book_name} {chapter_name} 下载中") - download_images(list_img,ci.getDirComicChapter(), files_name=files_name,concurrency=10,timeout=10) + download_images(list_img,ci.getDirComicChapter(), files_name=files_name,concurrency=None,timeout=8) equ_next = len(",".join(os.listdir(ci.getDirComicChapter())).split(".jpg"))-1 == len(list_img) if not equ_next: sleep_time = int(repeat)*2