20250916-正式上线测试
This commit is contained in:
@@ -380,7 +380,6 @@ class ScriptManager():
|
||||
session.appium_settings({"snapshotMaxDepth": 15})
|
||||
continue
|
||||
|
||||
|
||||
time.sleep(2)
|
||||
|
||||
# 找到并点击第一个视频
|
||||
@@ -481,7 +480,8 @@ class ScriptManager():
|
||||
|
||||
if isContainChniese:
|
||||
# 翻译成主播国家的语言
|
||||
LogManager.method_info(f"需要翻译:{text},参数为:国家为{anchorCountry}, 即将进行翻译", "关注打招呼", udid)
|
||||
LogManager.method_info(f"需要翻译:{text},参数为:国家为{anchorCountry}, 即将进行翻译",
|
||||
"关注打招呼", udid)
|
||||
|
||||
msg = Requester.translation(text, anchorCountry)
|
||||
|
||||
@@ -514,8 +514,14 @@ class ScriptManager():
|
||||
if followButton is not None:
|
||||
# LogManager.method_info("找到关注按钮了", "关注打招呼", udid)
|
||||
# followButton.click()
|
||||
x, y, w, h = followButton.bounds
|
||||
cx = int(x + w / 2)
|
||||
cy = int(y + h / 2)
|
||||
# 随机偏移 ±5 px(可自己改范围)
|
||||
cx += random.randint(-5, 5)
|
||||
cy += random.randint(-5, 5)
|
||||
|
||||
ControlUtils.micro_swipe_click(session, element=followButton, dist_min=1, dist_max=10, repeat=1)
|
||||
ControlUtils.tap_mini_cluster(cx, cy, session)
|
||||
|
||||
|
||||
else:
|
||||
@@ -738,7 +744,8 @@ class ScriptManager():
|
||||
|
||||
last_msg_text = last_msg
|
||||
else:
|
||||
LogManager.method_info(f"对方发送的消息不是语言,随机挑选作为最后一条进行回复:{last_msg}", "检测消息", udid)
|
||||
LogManager.method_info(f"对方发送的消息不是语言,随机挑选作为最后一条进行回复:{last_msg}",
|
||||
"检测消息", udid)
|
||||
last_msg_text = random.choice(text_list)
|
||||
|
||||
if AiUtils.contains_chinese(last_msg_text):
|
||||
|
||||
Reference in New Issue
Block a user