From 5f3f92a7fc0ca5e397f1be9c0388dd33ce4b2ccb Mon Sep 17 00:00:00 2001 From: blank X Date: Thu, 24 Dec 2020 21:56:55 +0700 Subject: [PATCH] Don't use result['data']['source'] --- sukuinote/plugins/saucenao.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/sukuinote/plugins/saucenao.py b/sukuinote/plugins/saucenao.py index 479de11..38deb61 100644 --- a/sukuinote/plugins/saucenao.py +++ b/sukuinote/plugins/saucenao.py @@ -84,12 +84,8 @@ async def saucenao(client, message): to_image = True break else: - if result['data'].get('source'): - if await download_file(result['data']['source'], filename): - to_image = True - if not to_image: - await download_file(result['header']['thumbnail'], filename) - to_image = True + await download_file(result['header']['thumbnail'], filename) + to_image = True atext += '\n\n' if len((await client.parser.parse(caption + atext))['message']) <= 1024: caption += atext