Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

建议增加随机时间的功能 #29

Open
kid1126 opened this issue Jan 4, 2025 · 2 comments
Open

建议增加随机时间的功能 #29

kid1126 opened this issue Jan 4, 2025 · 2 comments

Comments

@kid1126
Copy link

kid1126 commented Jan 4, 2025

每天固定启动时间、固定阅读时间,可能会被腾讯盯上。个人建议:
1.脚本开始阅读前,等待一个随机时间:

wait_time=random.randint(0, 300)
 logging.info(f"⏱️ 程序启动,等待{wait_time}秒...")
 time.sleep(wait_time)

2.环境变量直接填写阅读时间,而不是阅读次数:
READ_TIME=120

3.根据阅读时间环境变量生成单次阅读时间的序列:

remaining=READ_TIME
read_serial=[]
while  remaining>0:
    read_once=random.randint(25, 45)
    read_serial.append(read_once)
    remaining-=read_once

然后再遍历read_serial即可

@Zhao2z
Copy link
Contributor

Zhao2z commented Jan 6, 2025

个人感觉其实 内容变化(翻页) 这个实现了更能规避被盯上😂 读了二十多个小时同一页了。。

@findmover
Copy link
Owner

都是很好的建议,后面会采纳改一版

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants