File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11"""AutoWSGR - 战舰少女R 自动化框架(v2)"""
22
3- __version__ = '2.1.9.post7 '
3+ __version__ = '2.1.9.post8 '
Original file line number Diff line number Diff line change 1+ " 0 " :
2+ position : [900, 427]
3+ next : [A, B]
4+ A :
5+ position : [832, 172]
6+ next : [C, I]
7+ B :
8+ position : [787, 300]
9+ next : [D, F]
10+ C :
11+ position : [682, 60]
12+ next : []
13+ D :
14+ position : [683, 442]
15+ next : [E, G]
16+ E :
17+ position : [487, 495]
18+ next : []
19+ F :
20+ position : [630, 247]
21+ next : [H]
22+ G :
23+ position : [503, 397]
24+ next : [L]
25+ H :
26+ position : [449, 278]
27+ next : [L]
28+ I :
29+ position : [548, 180]
30+ next : [J, K]
31+ J :
32+ position : [435, 75]
33+ next : []
34+ K :
35+ position : [345, 240]
36+ next : [N, O]
37+ L :
38+ position : [316, 405]
39+ next : [M]
40+ M :
41+ position : [128, 367]
42+ next : [O]
43+ N :
44+ position : [240, 143]
45+ next : [O]
46+ O :
47+ position : [60, 203]
48+ next : []
Original file line number Diff line number Diff line change @@ -378,13 +378,7 @@ def _can_short_circuit(
378378 desired : list [str | None ],
379379 selectors : list [dict | None ],
380380 ) -> bool :
381- # 若指定了 search_name,不能在前置阶段仅凭同名/候选命中判定“已满足”。
382- for selector in selectors :
383- if not isinstance (selector , dict ):
384- continue
385- raw_search_name = selector .get ('search_name' )
386- if isinstance (raw_search_name , str ) and raw_search_name .strip ():
387- return False
381+ # 对 search_name 槽位执行精确匹配,满足时可直接短路,避免准备页重复扫描。
388382 return cls ._validate_with_selector (current , desired , selectors )
389383
390384 @classmethod
@@ -513,6 +507,12 @@ def _validate_with_selector(
513507 if current_name != target :
514508 return False
515509 continue
510+
511+ raw_search_name = selector .get ('search_name' )
512+ if isinstance (raw_search_name , str ) and raw_search_name .strip ():
513+ if not cls ._matches_search_name (current_name , raw_search_name ):
514+ return False
515+
516516 candidates = selector .get ('candidates' )
517517 if not isinstance (candidates , list ):
518518 if current_name != target :
You can’t perform that action at this time.
0 commit comments