From 2439498e65c7154e7f5cf7430261ab0a56554d21 Mon Sep 17 00:00:00 2001 From: RTAkland <79452994+MarkusJoe@users.noreply.github.com> Date: Mon, 14 Feb 2022 16:45:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BA=86bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/utils/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/utils/__init__.py b/bin/utils/__init__.py index 5960299..89d7d12 100644 --- a/bin/utils/__init__.py +++ b/bin/utils/__init__.py @@ -74,7 +74,7 @@ class Check: 开始下载 :return: """ - filesize = int(requests.get(self.assets_url).headers['Content-Length']) + filesize = int(self.session.head(self.assets_url).headers['Content-Length']) threaded_count = 3 print(f'I: 数据库大小: {round(filesize / 1024 / 1024, 2)}Mb. 下载线程: {threaded_count}') threading.BoundedSemaphore(threaded_count)