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

Function search_enrich

IntelOSINT.py:22014–22033  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

22012
22013@app.route('/api/search/enrich', methods=['POST'])
22014def search_enrich():
22015 payload = request.json or {}
22016 target = (payload.get('target') or "").strip()
22017 platforms = payload.get('platforms') or []
22018 if not target:
22019 return jsonify({"error": "target vuoto"}), 400
22020 if not isinstance(platforms, list) or len(platforms) == 0:
22021 platforms = [p for p in SOCIAL_MAP.keys() if p != "WhatsMyName (Social)"]
22022 out = []
22023 for p in platforms:
22024 try:
22025 res = core.enhanced_scraper(target, p)
22026 if not isinstance(res, list):
22027 res = [res]
22028 res = core.enrich_social_results(res, p, target)
22029 out.extend(res)
22030 except Exception as e:
22031 out.append({"username": target, "type": p, "info": {"Status": f"Errore batch: {e}", "__found": False}, "main_img": SOCIAL_MAP.get(p, {}).get("icon", ""), "status_code": 500, "url": ""})
22032 out = core._strip_internal_fields_from_results(out)
22033 return jsonify(out)
22034
22035@app.route('/api/crypto_graph', methods=['POST'])
22036def crypto_graph(): return jsonify(core.get_crypto_graph(request.json.get('address')))

Callers

nothing calls this directly

Calls 3

enhanced_scraperMethod · 0.80
enrich_social_resultsMethod · 0.80

Tested by

no test coverage detected