diff options
author | Kyomotoi 0w0 <[email protected]> | 2021-10-25 13:31:08 +0800 |
---|---|---|
committer | Kyomotoi 0w0 <[email protected]> | 2021-10-25 13:31:08 +0800 |
commit | 0ab46384acb730e371fce99f48c91f7c8f37d721 (patch) | |
tree | 35cc9de231da98b73556f6c9b5298ffcff323cc1 /ATRI/plugins/setu/tf_dealer.py | |
parent | 04ca019a3395e3bf3bf33d22ce4d6abb5682ffde (diff) | |
download | ATRI-0ab46384acb730e371fce99f48c91f7c8f37d721.tar.gz ATRI-0ab46384acb730e371fce99f48c91f7c8f37d721.tar.bz2 ATRI-0ab46384acb730e371fce99f48c91f7c8f37d721.zip |
🐛✨ 更新
Diffstat (limited to 'ATRI/plugins/setu/tf_dealer.py')
-rw-r--r-- | ATRI/plugins/setu/tf_dealer.py | 4 |
1 files changed, 2 insertions, 2 deletions
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: |