Don't use images from pixiv over 10MB
This commit is contained in:
parent
5916b87190
commit
a7de409535
|
@ -82,6 +82,7 @@ async def saucenao(client, message):
|
|||
pimg = json['body']['illust_details'].get(i)
|
||||
if pimg:
|
||||
if await download_file(pimg, filename, url):
|
||||
if os.path.getsize(filename) < 10000000:
|
||||
to_image = True
|
||||
break
|
||||
if await download_file(url, filename):
|
||||
|
|
Loading…
Reference in New Issue