- Added tracking for previously seen fudai in Runner and ProcRunner classes to avoid duplicate recognition. - Extracted room title during fudai recognition for better tracking. - Updated high_value_rooms.json with new room entries and adjusted total count. - Introduced new GUI elements for configuring icon coordinates in webui. - Created comprehensive documentation for the high-value room revisit functionality. - Added tests for delay settings and icon detection logic to ensure functionality. - Implemented a tool for analyzing step times in logs to identify performance bottlenecks.
51 lines
1.7 KiB
Python
51 lines
1.7 KiB
Python
#!/usr/bin/env python3
|
|
# -*- coding: utf-8 -*-
|
|
"""
|
|
测试养号延迟修改
|
|
"""
|
|
import sys
|
|
import os
|
|
sys.path.insert(0, os.path.dirname(__file__))
|
|
|
|
def test_delays():
|
|
"""测试延迟设置是否正确"""
|
|
print("=== 测试延迟设置 ===")
|
|
|
|
# 检查代码中是否包含正确的延迟调用
|
|
with open('douyin/other/douyin_yanghao.py', 'r', encoding='utf-8') as f:
|
|
content = f.read()
|
|
|
|
# 检查点击爱心前的延迟
|
|
if 'analyser.operation.delay(1.0) # 点击前延迟1秒' in content:
|
|
print("✅ 爱心点击前延迟1秒 - 正确")
|
|
else:
|
|
print("❌ 爱心点击前延迟未找到")
|
|
|
|
# 检查点击爱心后的延迟
|
|
if 'analyser.operation.delay(1.0) # 点击后延迟1秒' in content:
|
|
print("✅ 爱心点击后延迟1秒 - 正确")
|
|
else:
|
|
print("❌ 爱心点击后延迟未找到")
|
|
|
|
# 检查点击收藏前的延迟
|
|
if content.count('analyser.operation.delay(1.0) # 点击前延迟1秒') >= 2:
|
|
print("✅ 收藏点击前延迟1秒 - 正确")
|
|
else:
|
|
print("❌ 收藏点击前延迟未找到")
|
|
|
|
# 检查点击收藏后的延迟
|
|
if content.count('analyser.operation.delay(1.0) # 点击后延迟1秒') >= 2:
|
|
print("✅ 收藏点击后延迟1秒 - 正确")
|
|
else:
|
|
print("❌ 收藏点击后延迟未找到")
|
|
|
|
# 检查推荐页流程的延迟
|
|
if content.count('analyser.operation.delay(1.0)') >= 4: # 2个点击延迟 + 2个推荐页延迟
|
|
print("✅ 推荐页流程延迟1秒 - 正确")
|
|
else:
|
|
print("❌ 推荐页流程延迟不完整")
|
|
|
|
print("\n=== 延迟设置验证完成 ===")
|
|
|
|
if __name__ == "__main__":
|
|
test_delays() |