♻ 撤回 781dd99a 修改

This commit is contained in:
洛水居室 2022-08-31 16:04:02 +08:00
parent 77fc4d3358
commit 6aa6d68770
No known key found for this signature in database
GPG Key ID: C9DE87DA724B88FC

View File

@ -23,9 +23,7 @@ class WikiCache:
async def get(self, key: str) -> dict: async def get(self, key: str) -> dict:
qname = f"{self.qname}:{key}" qname = f"{self.qname}:{key}"
data = await self.client.get(qname) result = json.loads(await self.client.get(qname))
json_data = str(data, encoding="utf-8")
result = json.loads(json_data)
if isinstance(result, list) and len(result) > 0: if isinstance(result, list) and len(result) > 0:
for num, item in enumerate(result): for num, item in enumerate(result):
result[num] = json.loads(item) result[num] = json.loads(item)