From e0dc14ea73f81d2291e090e877241d9210f66b25 Mon Sep 17 00:00:00 2001
From: zhangkai <2403741920@qq.com>
Date: Tue, 16 Sep 2025 15:37:36 +0800
Subject: [PATCH] =?UTF-8?q?20250916-=E6=AD=A3=E5=BC=8F=E4=B8=8A=E7=BA=BF?=
=?UTF-8?q?=E6=B5=8B=E8=AF=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.idea/workspace.xml | 23 +++++++++++++++++------
Utils/AiUtils.py | 1 +
Utils/ControlUtils.py | 14 +++-----------
Utils/Requester.py | 3 +--
script/ScriptManager.py | 24 ++++++++++++++----------
5 files changed, 36 insertions(+), 29 deletions(-)
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index aa9dadf..5e2bccd 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -4,8 +4,10 @@
-
+
+
+
@@ -252,7 +254,7 @@
-
+
@@ -294,7 +296,15 @@
1757587781103
-
+
+
+ 1758002623317
+
+
+
+ 1758002623317
+
+
@@ -318,7 +328,8 @@
-
+
+
@@ -333,7 +344,7 @@
-
-
+
+
\ No newline at end of file
diff --git a/Utils/AiUtils.py b/Utils/AiUtils.py
index 69c5a47..5cedf6d 100644
--- a/Utils/AiUtils.py
+++ b/Utils/AiUtils.py
@@ -406,6 +406,7 @@ class AiUtils(object):
'分享发布内容', '视频贴纸标签页', '双击发送表情', '贴纸',
}
SYSTEM_PATTERNS = [
+ r"(消息请求已被接受|你开始了和.*的聊天|你打开了这个与.*的聊天).*"
r"回复时接收通知", r"开启(私信)?通知", r"开启通知",
r"你打开了这个与 .* 的聊天。.*隐私",
r"在此用户接受你的消息请求之前,你最多只能发送 ?\d+ 条消息。?",
diff --git a/Utils/ControlUtils.py b/Utils/ControlUtils.py
index 39a0f72..6a7abfa 100644
--- a/Utils/ControlUtils.py
+++ b/Utils/ControlUtils.py
@@ -1,4 +1,7 @@
+import math
+import random
import re
+import time
import tidevice
import wda
@@ -175,14 +178,3 @@ class ControlUtils(object):
left_x = max(1, rect.x - 20)
center_y = rect.y + rect.height // 2
session.tap(left_x, center_y)
-
-
-
-
- # 检测五分钟前和当前的状态是否相同
- # @classmethod
- # def compareCurrentWithPreviousState(cls,xml):
-
-
-
-
diff --git a/Utils/Requester.py b/Utils/Requester.py
index 1ab6d73..0f3330d 100644
--- a/Utils/Requester.py
+++ b/Utils/Requester.py
@@ -36,6 +36,7 @@ class Requester():
url = "https://ai.yolozs.com/translation"
result = requests.post(url=url, json=param)
+ LogManager.info(f"翻译 请求的参数:{param}")
LogManager.info(f"翻译,状态码:{result.status_code},服务器返回的内容:{result.text}")
if result.status_code != 200:
@@ -66,8 +67,6 @@ class Requester():
param["inputs"] = inputs
- print(param)
-
try:
url = "https://ai.yolozs.com/chat"
result = requests.post(url=url, json=param)
diff --git a/script/ScriptManager.py b/script/ScriptManager.py
index d9e116e..6578c27 100644
--- a/script/ScriptManager.py
+++ b/script/ScriptManager.py
@@ -510,16 +510,20 @@ class ScriptManager():
goBack(1)
# 点击关注按钮
- # followButton = AiUtils.getFollowButton(session)
- # if followButton is not None:
- # LogManager.method_info("找到关注按钮了", "关注打招呼", udid)
- # followButton.click()
- # else:
- # LogManager.method_info("没找到关注按钮", "关注打招呼", udid)
- # time.sleep(1)
- # goBack(4)
- # session.appium_settings({"snapshotMaxDepth": 15})
- # continue
+ followButton = AiUtils.getFollowButton(session).get(timeout=5)
+ if followButton is not None:
+ # LogManager.method_info("找到关注按钮了", "关注打招呼", udid)
+ # followButton.click()
+
+ ControlUtils.micro_swipe_click(session, element=followButton, dist_min=1, dist_max=10, repeat=1)
+
+
+ else:
+ LogManager.method_info("没找到关注按钮", "关注打招呼", udid)
+ time.sleep(1)
+ goBack(4)
+ session.appium_settings({"snapshotMaxDepth": 15})
+ continue
session.appium_settings({"snapshotMaxDepth": 15})
goBack(3)