diff --git a/GenshinUID/genshinuid_gachalog/export_and_import.py b/GenshinUID/genshinuid_gachalog/export_and_import.py index 415e2367..def9b569 100644 --- a/GenshinUID/genshinuid_gachalog/export_and_import.py +++ b/GenshinUID/genshinuid_gachalog/export_and_import.py @@ -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', '') diff --git a/GenshinUID/genshinuid_gachalog/lelaer_tools.py b/GenshinUID/genshinuid_gachalog/lelaer_tools.py index e1baa1fe..84ca1692 100644 --- a/GenshinUID/genshinuid_gachalog/lelaer_tools.py +++ b/GenshinUID/genshinuid_gachalog/lelaer_tools.py @@ -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: