From e30ee4109ec90b062a709025969fc051341a46ab Mon Sep 17 00:00:00 2001 From: ziZai771 <92359030+ziZai771@users.noreply.github.com> Date: Tue, 17 Dec 2024 15:48:10 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E5=86=85=E5=AE=B9=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E6=B7=BB=E5=8A=A0=E9=9A=8F=E6=9C=BA=E5=BB=B6=E6=97=B6?= =?UTF-8?q?=E7=AD=96=E7=95=A5=EF=BC=8C=E7=BB=95=E8=BF=87=E5=8F=8D=E7=88=AC?= =?UTF-8?q?=E9=AA=8C=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 5d64b0b..4495f7a 100644 --- a/main.py +++ b/main.py @@ -17,6 +17,7 @@ import traceback import dateparser import hashlib import copy +import random # 程序版本 version = "1.0.2" @@ -1105,7 +1106,7 @@ def main(page: ft.Page): if is_stop: return 0 response = get_message(total, 10) - time.sleep(1) + time.sleep(random.uniform(5, 10)) if "img" in response.text: # 请求成功,总量应该在当前总量的右侧 lower_bound = total + 1 @@ -1150,7 +1151,7 @@ def main(page: ft.Page): break try: # 获取消息并解码 - time.sleep(1) + time.sleep(random.uniform(5, 10)) message_content = get_message(i * 100, 100).text message = message_content if message_content else None if not message: