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

Method _safe_html_pick

IntelOSINT.py:14819–14828  ·  view source on GitHub ↗
(patterns)

Source from the content-addressed store, hash-verified

14817 if not payload.get("ok"):
14818 # fallback regex su page html se non abbiamo trovato nulla dal DOM/state/embedded JSON
14819 def _safe_html_pick(patterns):
14820 for p in patterns:
14821 if not isinstance(p, str):
14822 continue
14823 m = re.search(p, html, flags=re.IGNORECASE | re.DOTALL)
14824 if m:
14825 g = m.group(1)
14826 if g:
14827 return str(g).strip()
14828 return ""
14829 def _decode_js_string(v):
14830 return v.replace("\\\\", "\\").replace('\\"', '"').replace("\\'", "'")
14831 # tenta anche campi con quotes singole

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected