From 433f71cb36cd5feb0f93a130a802a8eb72281ec6 Mon Sep 17 00:00:00 2001 From: cheng zhen Date: Mon, 3 Feb 2025 20:19:54 +0800 Subject: [PATCH] feat: Improve Cursor version-specific machine ID reset logic --- README.md | 4 +--- cursor_pro_keep_alive.py | 10 ++++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 10b3c72..4f8d7b8 100644 --- a/README.md +++ b/README.md @@ -34,9 +34,7 @@ https://linux.do/ ## 请我喝杯茶 - - - + ## 关注公众号,随时获取仓库更新动态 diff --git a/cursor_pro_keep_alive.py b/cursor_pro_keep_alive.py index 5495bb2..a10e34e 100644 --- a/cursor_pro_keep_alive.py +++ b/cursor_pro_keep_alive.py @@ -398,7 +398,10 @@ if __name__ == "__main__": browser_manager = None try: logging.info("\n=== 初始化程序 ===") - ExitCursor() + # 小于0.45的版本需要打补丁 + less_than_0_45 = check_cursor_version() + if less_than_0_45: + ExitCursor() logging.info("正在初始化浏览器...") # 获取user_agent @@ -453,9 +456,8 @@ if __name__ == "__main__": ) logging.info("重置机器码...") - # 判断cursor版本是否大于0.44 - is_cursor_version_greater_than_0_44 = check_cursor_version() - if is_cursor_version_greater_than_0_44: + # 判断cursor版本是否小于0.45 + if less_than_0_45: MachineIDResetter().reset_machine_ids() else: patch_cursor_get_machine_id.patch_cursor_get_machine_id()