解析账号&Excel导入&实时日志
This commit is contained in:
+13
-4
@@ -602,12 +602,21 @@ def resolve_profile_by_search(
|
||||
continue
|
||||
|
||||
score = 0
|
||||
# 精确匹配小红书号:最高优先级
|
||||
if xhs_no and xhs_no.lower() == kw.lower():
|
||||
score += 100
|
||||
if nickname and kw in nickname:
|
||||
score += 10
|
||||
score += 1000
|
||||
# 精确匹配昵称:高优先级
|
||||
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):
|
||||
score += 1
|
||||
score += 5
|
||||
|
||||
if score > best_score:
|
||||
best_score = score
|
||||
|
||||
Reference in New Issue
Block a user