优化:调整配置文件中的重置动作和点击等待时间,提升代码逻辑清晰度;更新福袋分析逻辑以改善预约处理流程
This commit is contained in:
1 parent
b9b21d472f
commit
68e3f2ff34
2 files changed
+34
-15
No files matched your search
+3
-3
@@ -8,7 +8,7 @@
|
||||
"skip_if_countdown_gt_seconds": 118,
|
||||
"reset_after_swipes_enabled": true,
|
||||
"reset_after_swipes": 25,
|
||||
"reset_after_swipes_action": "back",
|
||||
"reset_after_swipes_action": "swipe",
|
||||
"auto_join_fansclub": true,
|
||||
"fansclub_fail_action": "switch",
|
||||
"high_value_fudai_enabled": true,
|
||||
@@ -29,11 +29,11 @@
|
||||
"yanghao_fallback_enter_live_x": 540,
|
||||
"yanghao_fallback_enter_live_y": 1200,
|
||||
"fudai_find_max_attempts": 99999,
|
||||
"fudai_icon_max_wait_seconds": 6.0,
|
||||
"fudai_icon_max_wait_seconds": 6.5,
|
||||
"fudai_icon_retry_delay_seconds": 0.1,
|
||||
"fudai_exit_after_misses": 10,
|
||||
"enable_back_on_misses": false,
|
||||
"fudai_click_wait_seconds": 2.0,
|
||||
"fudai_click_wait_seconds": 1.5,
|
||||
"fudai_detail_initial_wait_seconds": 0.8,
|
||||
"fudai_detail_verified_wait_seconds": 0.2,
|
||||
"fudai_detail_retry_delay_seconds": 0.5,
|
||||
|
||||
+31
-12
@@ -1977,25 +1977,44 @@ class fudai_analyse:
|
||||
if just_recorded:
|
||||
self._just_recorded_reservation = False # 清除标志
|
||||
try:
|
||||
needswitch = bool(getattr(self, "needswitch", True))
|
||||
self._log_kv(
|
||||
"预约",
|
||||
"[预约] 刚刚记录预约,继续在新直播间搜索福袋",
|
||||
)
|
||||
except Exception:
|
||||
needswitch = True
|
||||
if needswitch:
|
||||
pass
|
||||
try:
|
||||
needswitch_cfg = bool(getattr(self, "needswitch", True))
|
||||
except Exception:
|
||||
needswitch_cfg = True
|
||||
if needswitch_cfg:
|
||||
try:
|
||||
self.swipe_up_to_next_live()
|
||||
except Exception as exc:
|
||||
try:
|
||||
self._log_kv(
|
||||
"预约",
|
||||
"[预约] 执行上滑切换失败",
|
||||
error=str(exc),
|
||||
error_type=type(exc).__name__,
|
||||
)
|
||||
except Exception:
|
||||
pass
|
||||
else:
|
||||
try:
|
||||
self._log_kv(
|
||||
"预约",
|
||||
"[预约] 刚刚记录预约,强制切换直播间避免循环",
|
||||
"[预约] just_recorded_reservation 触发,但 needswitch=False,未切换",
|
||||
)
|
||||
except Exception:
|
||||
pass
|
||||
self.swipe_up_to_next_live()
|
||||
elapsed = time.time() - start_time
|
||||
self._log_kv(
|
||||
"流程",
|
||||
"run_once_basic完成(强制切换直播间)",
|
||||
elapsed_seconds=round(elapsed, 2),
|
||||
)
|
||||
return
|
||||
elapsed = time.time() - start_time
|
||||
self._log_kv(
|
||||
"流程",
|
||||
"run_once_basic完成(记录预约后切换直播间)",
|
||||
elapsed_seconds=round(elapsed, 2),
|
||||
)
|
||||
return
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
|
||||
Reference in new issue
Block a user