Skip to content
This repository was archived by the owner on Aug 7, 2025. It is now read-only.

Commit 208864e

Browse files
author
cheng zhen
committed
feat: 优化代码风格并新增公众号信息展示
1. 代码格式化,移除多余空行 2. 调整代码缩进和空格 3. 在结束信息打印中新增公众号信息展示
1 parent f90e6ee commit 208864e

File tree

1 file changed

+11
-14
lines changed

1 file changed

+11
-14
lines changed

cursor_pro_keep_alive.py

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -328,25 +328,24 @@ def __init__(
328328
configInstance = Config()
329329
configInstance.print_config()
330330
self.domain = configInstance.get_domain()
331-
self.names=self.load_names()
331+
self.names = self.load_names()
332332
self.default_password = password
333333
self.default_first_name = self.generate_random_name()
334334
self.default_last_name = self.generate_random_name()
335-
335+
336336
def load_names(self):
337-
with open('names-dataset.txt', 'r') as file:
337+
with open("names-dataset.txt", "r") as file:
338338
return file.read().split()
339-
340-
def generate_random_name(self):
341-
"""生成随机用户名"""
342-
return random.choice(self.names)
343339

340+
def generate_random_name(self):
341+
"""生成随机用户名"""
342+
return random.choice(self.names)
344343

345344
def generate_email(self, length=4):
346-
"""生成随机邮箱地址"""
347-
length=random.randint(0, length) # 生成0到length之间的随机整数
345+
"""生成随机邮箱地址"""
346+
length = random.randint(0, length) # 生成0到length之间的随机整数
348347
timestamp = str(int(time.time()))[-length:] # 使用时间戳后length位
349-
return f"{self.default_first_name}{timestamp}@{self.domain}"#
348+
return f"{self.default_first_name}{timestamp}@{self.domain}" #
350349

351350
def get_account_info(self):
352351
"""获取完整的账号信息"""
@@ -394,6 +393,7 @@ def print_end_message():
394393
logging.info("所有操作已完成")
395394
logging.info("\n=== 获取更多信息 ===")
396395
logging.info("📺 B站UP主: 想回家的前端")
396+
logging.info("🔥 公众号: code 未来")
397397
logging.info("=" * 30)
398398
logging.info(
399399
"请前往开源项目查看更多信息:https://github.com/chengazhen/cursor-auto-free"
@@ -457,21 +457,18 @@ def print_end_message():
457457
mail_url = "https://tempmail.plus"
458458

459459
logging.info("正在生成随机账号信息...")
460-
460+
461461
email_generator = EmailGenerator()
462462
first_name = email_generator.default_first_name
463463
last_name = email_generator.default_last_name
464464
account = email_generator.generate_email()
465465
password = email_generator.default_password
466466

467-
468-
469467
logging.info(f"生成的邮箱账号: {account}")
470468

471469
logging.info("正在初始化邮箱验证模块...")
472470
email_handler = EmailVerificationHandler(account)
473471

474-
475472
auto_update_cursor_auth = True
476473

477474
tab = browser.latest_tab

0 commit comments

Comments
 (0)