🎨 添加警告

This commit is contained in:
KimigaiiWuyi 2024-05-16 04:48:16 +08:00
parent d5586e420b
commit 11b53e5547
2 changed files with 3 additions and 1 deletions

View File

@ -31,6 +31,8 @@ async def import_gachalogs(history_url: str, type: str, uid: str) -> str:
history_data = json.loads(data_bytes.decode())
except UnicodeDecodeError:
history_data = json.loads(data_bytes.decode('gbk'))
except json.decoder.JSONDecodeError:
return '请传入正确的JSON格式文件!'
if 'info' in history_data and 'uid' in history_data['info']:
data_uid = history_data['info']['uid']
if data_uid != uid: