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

Method _strip_internal_fields

IntelOSINT.py:14295–14369  ·  view source on GitHub ↗
(self, item)

Source from the content-addressed store, hash-verified

14293 }
14294
14295 def _strip_internal_fields(self, item):
14296 if not isinstance(item, dict):
14297 return item
14298
14299 info = item.get("info")
14300 if isinstance(info, dict):
14301 hidden_exact = {
14302 "__bmtechniques",
14303 "__bmprofilechecks",
14304 "__bmconfidence",
14305 "__bmversion",
14306 "__bmsource",
14307 "__enrichedat",
14308 "__found",
14309 "__bmstatus",
14310 "statuslabel",
14311 "rawsignals",
14312 "mediaassets",
14313 "bmtechnique",
14314 "tecnichebookmarkletapplicate",
14315 "bookmarkletapplicate",
14316 "qualitadati",
14317 "arricchitoil",
14318 "enrichedat",
14319 "prodottoapplicato",
14320 "arricchito",
14321 "qualita"
14322 }
14323 hidden_needles = (
14324 "rawsignals",
14325 "mediaassets",
14326 "tecnichebookmarklet",
14327 "bookmarklet",
14328 "qualitadati",
14329 "arricchito",
14330 "statuslabel",
14331 "arricchitoil",
14332 "profilepostsmediametadataenrichment",
14333 "profilopostsmediametadata",
14334 "bmtechniques",
14335 "bmprofilechecks",
14336 "bmsource",
14337 "bmconfidence",
14338 "bmversion"
14339 )
14340 cleaned_info = {}
14341 for k, v in info.items():
14342 if not isinstance(k, str):
14343 cleaned_info[k] = v
14344 continue
14345 normalized = (
14346 str(k)
14347 .strip()
14348 .lower()
14349 .replace("à", "a")
14350 .replace("è", "e")
14351 .replace("é", "e")
14352 .replace("ì", "i")

Calls

no outgoing calls

Tested by

no test coverage detected