This commit is contained in:
caiwx86 2023-04-01 12:31:40 +08:00
parent 8ebc2c1f44
commit 44a4d2c28f
2 changed files with 2 additions and 2 deletions

View File

@ -64,7 +64,7 @@ class htmlUtils:
else: url_text = None else: url_text = None
while url_text == None: while url_text == None:
print(f"请求地址:{curl}") 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": if type == "bytes":
url_text = res url_text = res
if type == "json": if type == "json":

View File

@ -127,7 +127,7 @@ class baseComic:
repeat = 1 repeat = 1
while is_next and repeat <= 10 and not CBZUtils.updateOldCBZ(files_name): while is_next and repeat <= 10 and not CBZUtils.updateOldCBZ(files_name):
ntfy.sendMsg(f"{book_name} {chapter_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) equ_next = len(",".join(os.listdir(ci.getDirComicChapter())).split(".jpg"))-1 == len(list_img)
if not equ_next: if not equ_next:
sleep_time = int(repeat)*2 sleep_time = int(repeat)*2