From dd76d0068d374e9cdaecc956eb465f630b978eb4 Mon Sep 17 00:00:00 2001 From: Myned Date: Sun, 15 Mar 2020 21:28:42 -0400 Subject: [PATCH] Fix reverse search url regression --- src/utils/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/utils.py b/src/utils/utils.py index 5627b02..10ef267 100644 --- a/src/utils/utils.py +++ b/src/utils/utils.py @@ -85,7 +85,7 @@ asession = aiohttp.ClientSession() async def fetch(url, *, json=False, response=False, text=False): - if 'e621' in url or 'e926' in url: + if '.json' in url and ('e621' in url or 'e926' in url): url += f'&login=BotMyned&api_key={config["e621_api"]}' async with asession.get(url, headers={ 'User-Agent': 'Myned/Modufur (https://github.com/Myned/Modufur)'}, ssl=False) as r: