diff --git a/utils/NetUtils.py b/utils/NetUtils.py index 4325138..4e3c2e7 100644 --- a/utils/NetUtils.py +++ b/utils/NetUtils.py @@ -201,14 +201,15 @@ class downloadUtils: @classmethod def download_image(cls,timeout=20, proxy_type=None, proxy=None,type="image"): repeat = 0 - while not cls.down_queue.empty() and repeat <= 10: + while not cls.down_queue.empty() and repeat <= 15: repeat += 1 data = cls.down_queue.get(False) (file_name,image_url,dst_dir) = [data[0],data[1],data[2]] if repeat > 1: print(f"第{repeat}次下载数据中... file_name={file_name}") try: - cls.common_download(file_name,image_url,dst_dir) + cls.common_download(file_name,image_url,dst_dir,timeout=timeout, + proxy=proxy,proxy_type=proxy_type) except: print(f"下载重试中 {file_name}={image_url}") cls.down_queue.put([file_name,image_url,dst_dir])