From 0ab46384acb730e371fce99f48c91f7c8f37d721 Mon Sep 17 00:00:00 2001 From: Kyomotoi 0w0 Date: Mon, 25 Oct 2021 13:31:08 +0800 Subject: =?UTF-8?q?=F0=9F=90=9B=E2=9C=A8=20=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ATRI/plugins/setu/tf_dealer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ATRI/plugins/setu/tf_dealer.py') diff --git a/ATRI/plugins/setu/tf_dealer.py b/ATRI/plugins/setu/tf_dealer.py index f41de49..bf68020 100644 --- a/ATRI/plugins/setu/tf_dealer.py +++ b/ATRI/plugins/setu/tf_dealer.py @@ -49,14 +49,14 @@ def prepare_image(img): return image -async def detect_image(url) -> list: +async def detect_image(url: str, file_size: int) -> list: try: req = await request.get(url) except RequestError: raise RequestError("Get info from download image failed!") img_byte = getsizeof(req.read()) // 1024 - if img_byte < 256: + if img_byte < file_size: return [0, 0] try: -- cgit v1.2.3