diff --git a/.idea/git_toolbox_blame.xml b/.idea/git_toolbox_blame.xml
new file mode 100644
index 0000000..7dc1249
--- /dev/null
+++ b/.idea/git_toolbox_blame.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/iOSAI.iml b/.idea/iOSAI.iml
index aad402c..ec63674 100644
--- a/.idea/iOSAI.iml
+++ b/.idea/iOSAI.iml
@@ -4,7 +4,4 @@
-
-
-
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
index 589e6f0..6eda094 100644
--- a/.idea/inspectionProfiles/Project_Default.xml
+++ b/.idea/inspectionProfiles/Project_Default.xml
@@ -3,12 +3,18 @@
+
+
+
diff --git a/.idea/misc.xml b/.idea/misc.xml
index db8786c..575b414 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -1,7 +1,7 @@
-
+
-
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index df5422b..688d0ba 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -5,8 +5,16 @@
+
+
+
+
+
-
+
+
+
+
@@ -36,6 +44,7 @@
+
{
"customColor": "",
@@ -69,7 +78,7 @@
"git-widget-placeholder": "main",
"javascript.nodejs.core.library.configured.version": "20.17.0",
"javascript.nodejs.core.library.typings.version": "20.17.58",
- "last_opened_file_path": "E:/code/Python/iOSAi/resources/iproxy",
+ "last_opened_file_path": "E:/python/IOSAI/Module/Main.py",
"node.js.detected.package.eslint": "true",
"node.js.detected.package.tslint": "true",
"node.js.selected.package.eslint": "(autodetect)",
@@ -77,11 +86,13 @@
"nodejs_package_manager_path": "npm",
"settings.editor.selected.configurable": "editing.templates",
"two.files.diff.last.used.file": "E:/share/iOSAI/Module/FlaskService.py",
+ "two.files.diff.last.used.folder": "C:/Users/zhangkai/Desktop/last-item/iosai/Utils",
"vue.rearranger.settings.migration": "true"
}
}
+
@@ -107,6 +118,7 @@
+
@@ -125,7 +137,7 @@
-
+
@@ -140,6 +152,10 @@
+
+
+
+
@@ -149,7 +165,8 @@
-
+
+
@@ -217,6 +234,10 @@
+
+
+
+
diff --git a/Utils/LogManager.py b/Utils/LogManager.py
index 0c8bb94..3981133 100644
--- a/Utils/LogManager.py
+++ b/Utils/LogManager.py
@@ -26,7 +26,7 @@ def _force_utf8_everywhere():
except Exception:
pass
-# _force_utf8_everywhere()
+_force_utf8_everywhere()
class LogManager:
"""
diff --git a/resources/00008110-000120603C13801E/bgv.png b/resources/00008110-000120603C13801E/bgv.png
deleted file mode 100644
index 932fcaf..0000000
Binary files a/resources/00008110-000120603C13801E/bgv.png and /dev/null differ
diff --git a/resources/00008110-000120603C13801E/bgv_comment.png b/resources/00008110-000120603C13801E/bgv_comment.png
deleted file mode 100644
index ec08978..0000000
Binary files a/resources/00008110-000120603C13801E/bgv_comment.png and /dev/null differ
diff --git a/resources/insert_comment2.png b/resources/insert_comment2.png
new file mode 100644
index 0000000..94c03b7
Binary files /dev/null and b/resources/insert_comment2.png differ
diff --git a/script/ScriptManager.py b/script/ScriptManager.py
index a016a78..5bfe692 100644
--- a/script/ScriptManager.py
+++ b/script/ScriptManager.py
@@ -45,6 +45,7 @@ class ScriptManager():
self.resources_dir = project_root / "resources"
self.comment_dir = self.resources_dir / "comment.png"
self.comment_add_dir = self.resources_dir / "insert_comment.png"
+ self.comment_add_dir2 = self.resources_dir / "insert_comment2.png"
self.initialized = True # 标记已初始化
@@ -73,25 +74,44 @@ class ScriptManager():
img.save(filePath)
# 从评论列表中随机取出一条数据,进行评论
- single_comment = random.choice(Variables.commentList)
+ if Variables.commentList:
+ single_comment = random.choice(Variables.commentList)
+ else:
+ single_comment = "评论没有导入数据"
+
coord2 = OCRUtils.find_template(str(self.comment_add_dir), filePath)
- # print(single_comment)
+
if coord2: # 二判命中
+ print(f"方案1")
cx2, cy2 = coord2[0]
print(f"添加评论:{cx2, cy2}")
session.tap(int(cx2 / 3), int(cy2 / 3))
print(f"点击添加评论的坐标:{int(cx2 / 3)}, {int(cy2 / 3)}")
-
session.send_keys(f"{single_comment}\n")
- # session.send_keys(f"hello\n")
time.sleep(2)
LogManager.method_info("评论成功", "养号", udid)
+ else:
+ time.sleep(1)
+ print(f"方案2")
+ img = session.screenshot()
+ filePath = os.path.join(os.path.dirname(filePath), "bgv_comment.png")
+ img.save(filePath)
+ coord3 = OCRUtils.find_template(str(self.comment_add_dir2), filePath)
+ if coord3: # 二判命中
+ cx3, cy3 = coord3[0]
+ session.tap(int(cx3 / 3), int(cy3 / 3))
+ session.send_keys(f"{single_comment}\n")
+ time.sleep(2)
+ LogManager.method_info("评论成功", "养号", udid)
# 点返回/取消按钮:优先用推荐按钮坐标,没有就兜底 100,100
tap_x = int(recomend_cx) if recomend_cx else 100
tap_y = int(recomend_cy) if recomend_cy else 100
session.tap(tap_x, tap_y)
+ time.sleep(1)
+ session.tap(tap_x, tap_y)
+
# 养号
def growAccount(self, udid, event, is_monitoring=False):