mirror of
https://github.com/KimigaiiWuyi/GenshinUID.git
synced 2025-05-08 04:55:51 +08:00
🐛 从小助手导入抽卡记录
, 导出抽卡记录到小助手
This commit is contained in:
parent
1ad366529f
commit
f62a1e56da
@ -67,6 +67,10 @@ async def import_gachalogs(history_url: str, type: str, uid: str) -> str:
|
||||
history_data = json.loads(data_bytes.decode('gbk'))
|
||||
except json.decoder.JSONDecodeError:
|
||||
return '请传入正确的JSON格式文件!'
|
||||
|
||||
if 'info' in history_data and 'uigf_version' in history_data['info']:
|
||||
history_data['info']['version'] = history_data['info']['uigf_version']
|
||||
|
||||
if 'info' in history_data and 'version' in history_data['info']:
|
||||
_version: str = str(history_data['info']['version'])
|
||||
_version = _version.replace('version', '').replace('v', '')
|
||||
|
@ -43,13 +43,14 @@ async def get_lelaer_gachalog(uid: str):
|
||||
history_data = await client.post(
|
||||
'https://www.lelaer.com/outputGacha.php', data=data
|
||||
)
|
||||
logger.debug(history_data.content)
|
||||
history_log = history_data.text
|
||||
return await import_gachalogs(history_log, 'json', uid)
|
||||
|
||||
|
||||
async def export_gachalog_to_lelaer(uid: str):
|
||||
gachalog_url = await get_gachaurl(uid)
|
||||
export = await export_gachalogs(uid)
|
||||
export = await export_gachalogs(uid, '2')
|
||||
if export['retcode'] == 'ok':
|
||||
file_path = export['url']
|
||||
else:
|
||||
|
Loading…
x
Reference in New Issue
Block a user