dominusnode-moltbook 1.2.0__tar.gz → 1.2.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of dominusnode-moltbook might be problematic. Click here for more details.
- {dominusnode_moltbook-1.2.0 → dominusnode_moltbook-1.2.2}/PKG-INFO +1 -1
- {dominusnode_moltbook-1.2.0 → dominusnode_moltbook-1.2.2}/dominusnode_moltbook/client.py +65 -0
- {dominusnode_moltbook-1.2.0 → dominusnode_moltbook-1.2.2}/dominusnode_moltbook.egg-info/PKG-INFO +1 -1
- {dominusnode_moltbook-1.2.0 → dominusnode_moltbook-1.2.2}/pyproject.toml +1 -1
- {dominusnode_moltbook-1.2.0 → dominusnode_moltbook-1.2.2}/LICENSE +0 -0
- {dominusnode_moltbook-1.2.0 → dominusnode_moltbook-1.2.2}/README.md +0 -0
- {dominusnode_moltbook-1.2.0 → dominusnode_moltbook-1.2.2}/dominusnode_moltbook/__init__.py +0 -0
- {dominusnode_moltbook-1.2.0 → dominusnode_moltbook-1.2.2}/dominusnode_moltbook.egg-info/SOURCES.txt +0 -0
- {dominusnode_moltbook-1.2.0 → dominusnode_moltbook-1.2.2}/dominusnode_moltbook.egg-info/dependency_links.txt +0 -0
- {dominusnode_moltbook-1.2.0 → dominusnode_moltbook-1.2.2}/dominusnode_moltbook.egg-info/requires.txt +0 -0
- {dominusnode_moltbook-1.2.0 → dominusnode_moltbook-1.2.2}/dominusnode_moltbook.egg-info/top_level.txt +0 -0
- {dominusnode_moltbook-1.2.0 → dominusnode_moltbook-1.2.2}/setup.cfg +0 -0
- {dominusnode_moltbook-1.2.0 → dominusnode_moltbook-1.2.2}/tests/test_client.py +0 -0
|
@@ -1266,6 +1266,71 @@ class MoltbookClient:
|
|
|
1266
1266
|
except Exception as e:
|
|
1267
1267
|
return json.dumps({"error": _sanitize_error(str(e))})
|
|
1268
1268
|
|
|
1269
|
+
# ==================================================================
|
|
1270
|
+
# Dominus Node Tool 4b: proxied_fetch
|
|
1271
|
+
# ==================================================================
|
|
1272
|
+
|
|
1273
|
+
def proxied_fetch(
|
|
1274
|
+
self,
|
|
1275
|
+
url: str,
|
|
1276
|
+
country: str = "US",
|
|
1277
|
+
proxy_type: str = "dc",
|
|
1278
|
+
) -> str:
|
|
1279
|
+
"""Fetch a URL through Dominus Node's rotating proxy gateway.
|
|
1280
|
+
|
|
1281
|
+
Routes the request through the proxy gateway using HTTP CONNECT for
|
|
1282
|
+
HTTPS URLs and full-URL path for HTTP URLs. Only GET requests are
|
|
1283
|
+
supported.
|
|
1284
|
+
|
|
1285
|
+
Args:
|
|
1286
|
+
url: Target URL to fetch (http or https).
|
|
1287
|
+
country: ISO 3166-1 alpha-2 country code for geo-targeting.
|
|
1288
|
+
proxy_type: Proxy pool type -- ``dc`` (datacenter, $3/GB) or
|
|
1289
|
+
``residential`` ($5/GB).
|
|
1290
|
+
|
|
1291
|
+
Returns:
|
|
1292
|
+
JSON string with ``status``, ``body`` (truncated to 4000 chars),
|
|
1293
|
+
and ``bytes`` keys.
|
|
1294
|
+
"""
|
|
1295
|
+
try:
|
|
1296
|
+
validated = validate_url(url)
|
|
1297
|
+
except ValueError as e:
|
|
1298
|
+
return json.dumps({"error": str(e)})
|
|
1299
|
+
|
|
1300
|
+
if country and country.upper() in SANCTIONED_COUNTRIES:
|
|
1301
|
+
return json.dumps({"error": f"Country '{country.upper()}' is blocked (OFAC sanctioned)"})
|
|
1302
|
+
|
|
1303
|
+
if proxy_type not in ("dc", "residential"):
|
|
1304
|
+
return json.dumps({"error": "proxy_type must be 'dc' or 'residential'"})
|
|
1305
|
+
|
|
1306
|
+
try:
|
|
1307
|
+
parts = []
|
|
1308
|
+
if proxy_type and proxy_type != "auto":
|
|
1309
|
+
parts.append(proxy_type)
|
|
1310
|
+
if country:
|
|
1311
|
+
parts.append(f"country-{country.upper()}")
|
|
1312
|
+
username = "-".join(parts) if parts else "auto"
|
|
1313
|
+
|
|
1314
|
+
with httpx.Client(
|
|
1315
|
+
proxy=f"http://{username}:{self.dominusnode_api_key}@{self.proxy_host}:{self.proxy_port}",
|
|
1316
|
+
timeout=self.timeout,
|
|
1317
|
+
follow_redirects=False,
|
|
1318
|
+
) as client:
|
|
1319
|
+
resp = client.get(validated)
|
|
1320
|
+
|
|
1321
|
+
body_bytes = len(resp.content)
|
|
1322
|
+
if body_bytes > 10 * 1024 * 1024:
|
|
1323
|
+
return json.dumps({"error": "Response too large (exceeds 10MB limit)"})
|
|
1324
|
+
|
|
1325
|
+
body_text = resp.text[:4000]
|
|
1326
|
+
return json.dumps({
|
|
1327
|
+
"status": resp.status_code,
|
|
1328
|
+
"body": body_text,
|
|
1329
|
+
"bytes": body_bytes,
|
|
1330
|
+
})
|
|
1331
|
+
except Exception as e:
|
|
1332
|
+
return json.dumps({"error": _sanitize_error(str(e))})
|
|
1333
|
+
|
|
1269
1334
|
# ==================================================================
|
|
1270
1335
|
# Dominus Node Tool 5: create_agentic_wallet
|
|
1271
1336
|
# ==================================================================
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "dominusnode-moltbook"
|
|
7
|
-
version = "1.2.
|
|
7
|
+
version = "1.2.2"
|
|
8
8
|
description = "Dominus Node integration for Moltbook -- interact with the AI agent social network through rotating proxies"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = {text = "MIT"}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dominusnode_moltbook-1.2.0 → dominusnode_moltbook-1.2.2}/dominusnode_moltbook.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{dominusnode_moltbook-1.2.0 → dominusnode_moltbook-1.2.2}/dominusnode_moltbook.egg-info/requires.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|