MCPcopy
hub / github.com/elementalsouls/Claude-OSINT / gql_raw

Function gql_raw

skills/offensive-osint/scripts/h1_reference.py:100–112  ·  view source on GitHub ↗
(query: str)

Source from the content-addressed store, hash-verified

98
99
100def gql_raw(query: str) -> dict:
101 payload = json.dumps({"query": query}).encode()
102 req = urllib.request.Request(GRAPHQL_URL, data=payload, headers=HEADERS, method="POST")
103 try:
104 with urllib.request.urlopen(req, timeout=20) as resp:
105 return json.loads(resp.read())
106 except urllib.error.HTTPError as e:
107 body = e.read().decode(errors="replace")
108 print(f"[!] HTTP {e.code}: {body[:300]}", file=sys.stderr)
109 sys.exit(1)
110 except Exception as e:
111 print(f"[!] Request failed: {e}", file=sys.stderr)
112 sys.exit(1)
113
114
115def gql_vars(query: str, variables: dict) -> dict:

Callers 1

fetch_all_pagesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected