MCPcopy Create free account
hub / github.com/CScorza/IntelOSINT / _pick_profile_name

Method _pick_profile_name

IntelOSINT.py:15012–15031  ·  view source on GitHub ↗
(profile)

Source from the content-addressed store, hash-verified

15010 return any(t in s for t in generic_tokens)
15011
15012 def _pick_profile_name(profile):
15013 if not isinstance(profile, dict):
15014 return ""
15015 candidate = profile.get("fullName") or profile.get("full_name") or profile.get("displayName")
15016 if isinstance(candidate, str):
15017 candidate = candidate.strip()
15018 if candidate and _norm_text(candidate) not in noisy_labels and _norm_text(candidate) not in {"n/a"}:
15019 return candidate
15020 candidate = profile.get("name") or profile.get("title")
15021 if isinstance(candidate, str):
15022 candidate = candidate.strip()
15023 if candidate and _norm_text(candidate) not in noisy_labels and _norm_text(candidate) not in {"n/a"}:
15024 return candidate
15025 first = str(profile.get("firstName") or "").strip()
15026 last = str(profile.get("lastName") or "").strip()
15027 if first or last:
15028 full = " ".join([x for x in (first, last) if x]).strip()
15029 if full:
15030 return full
15031 return ""
15032
15033 def _looks_noisy_profile(profile):
15034 if not isinstance(profile, dict):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected