feat: 优化标题校验逻辑,合并空标题判断条件以提高代码可读性
This commit is contained in:
1 parent
f0538ab3fc
commit
7e5d88d3f1
1 file changed
+5
-8
@@ -402,14 +402,11 @@ def validate_back_to_reservation(
|
||||
|
||||
# 强不匹配:仅返回失败(不做任何回退动作)
|
||||
# 当标题为空时也视为失败,因为无法确认是否在正确直播间
|
||||
if (
|
||||
(not current_title) # 标题为空,读取失败
|
||||
or (
|
||||
current_title
|
||||
and (expected_title not in current_title)
|
||||
and (current_title not in expected_title)
|
||||
and ratio < 0.45
|
||||
)
|
||||
if (not current_title) or ( # 标题为空,读取失败
|
||||
current_title
|
||||
and (expected_title not in current_title)
|
||||
and (current_title not in expected_title)
|
||||
and ratio < 0.45
|
||||
):
|
||||
try:
|
||||
analyser._log_kv(
|
||||
|
||||
Reference in new issue
Block a user