解析账号&Excel导入&实时日志

This commit is contained in:
mzl
2026-01-10 21:36:20 +08:00
parent fbc1b35ea8
commit e69df2ebb6
+13 -4
View File
@@ -602,12 +602,21 @@ def resolve_profile_by_search(
continue continue
score = 0 score = 0
# 精确匹配小红书号:最高优先级
if xhs_no and xhs_no.lower() == kw.lower(): if xhs_no and xhs_no.lower() == kw.lower():
score += 100 score += 1000
if nickname and kw in nickname: # 精确匹配昵称:高优先级
score += 10 elif nickname and nickname.lower() == kw.lower():
score += 500
# 昵称包含关键词:中优先级
elif nickname and kw.lower() in nickname.lower():
score += 50
# URL 中包含关键词:低优先级
if kw.lower() in href.lower():
score += 20
# 有有效的 profile ID:基础分
if _extract_profile_id_from_href(href): if _extract_profile_id_from_href(href):
score += 1 score += 5
if score > best_score: if score > best_score:
best_score = score best_score = score