From 6aa6d68770059859deef4264a9e199f0e338ce05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B4=9B=E6=B0=B4=E5=B1=85=E5=AE=A4?= Date: Wed, 31 Aug 2022 16:04:02 +0800 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=20=E6=92=A4=E5=9B=9E=20`781dd99a`=20?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/wiki/cache.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/core/wiki/cache.py b/core/wiki/cache.py index 1b2498d..752ca69 100644 --- a/core/wiki/cache.py +++ b/core/wiki/cache.py @@ -23,9 +23,7 @@ class WikiCache: async def get(self, key: str) -> dict: qname = f"{self.qname}:{key}" - data = await self.client.get(qname) - json_data = str(data, encoding="utf-8") - result = json.loads(json_data) + result = json.loads(await self.client.get(qname)) if isinstance(result, list) and len(result) > 0: for num, item in enumerate(result): result[num] = json.loads(item)