mirror of
https://github.com/PaiGramTeam/PaiGram.git
synced 2025-01-18 17:41:03 +00:00
🐛 修复读写缓存时没有转换数据类型的错误
This commit is contained in:
parent
623acf8012
commit
781dd99ab6
@ -23,7 +23,9 @@ class WikiCache:
|
||||
|
||||
async def get(self, key: str) -> dict:
|
||||
qname = f"{self.qname}:{key}"
|
||||
result = json.loads(await self.client.get(qname))
|
||||
data = 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:
|
||||
for num, item in enumerate(result):
|
||||
result[num] = json.loads(item)
|
||||
|
Loading…
Reference in New Issue
Block a user