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

Method _normalize_google_image_url

IntelOSINT.py:11155–11171  ·  view source on GitHub ↗
(self, url, size="w800-h600-k-no")

Source from the content-addressed store, hash-verified

11153 return None
11154
11155 def _normalize_google_image_url(self, url, size="w800-h600-k-no"):
11156 try:
11157 u = html.unescape(str(url or ""))
11158 u = u.replace("\\u003d", "=").replace("\\u0026", "&").replace("\\/", "/")
11159 if u.startswith("//"):
11160 u = "https:" + u
11161 if not u.startswith("http"):
11162 return ""
11163 u = u.split("\\")[0].strip().rstrip(".,;)]}")
11164 if not u.startswith("https://lh3.googleusercontent.com/"):
11165 return ""
11166 base = u.split("=", 1)[0]
11167 if "/a/" in base:
11168 return ""
11169 return f"{base}={size}"
11170 except Exception:
11171 return ""
11172
11173 def _google_maps_contrib_probe(self, gaia_id):
11174 out = {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected