From c37fc785b03430d18f107de0fa8892b9734e2d8d Mon Sep 17 00:00:00 2001 From: Albert Lin <110967456+gkcoll@users.noreply.github.com> Date: Sun, 7 Jan 2024 14:20:51 +0800 Subject: [PATCH] Update lx_script.py Fix display error in generated `lx-music-source-example.js` file by set encoding. --- common/lx_script.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/lx_script.py b/common/lx_script.py index 7926203..aed1362 100644 --- a/common/lx_script.py +++ b/common/lx_script.py @@ -61,7 +61,7 @@ async def get_response(retry = 0): async def get_script(): req = await get_response() if (req.status == 200): - with open('./lx-music-source-example.js', 'w') as f: + with open('./lx-music-source-example.js', 'w', encoding='utf-8') as f: f.write(req.text) f.close() logger.info('更新源脚本成功')