@acedatacloud/skills 2026.707.0 → 2026.712.0
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.
- package/package.json +1 -1
- package/skills/x/scripts/x.py +15 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@acedatacloud/skills",
|
|
3
|
-
"version": "2026.
|
|
3
|
+
"version": "2026.712.0",
|
|
4
4
|
"description": "Agent Skills for AceDataCloud AI services — music, image, video generation, LLM chat, web search. Compatible with Claude Code, GitHub Copilot, Gemini CLI, OpenAI Codex, and 30+ AI coding agents.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agent-skills",
|
package/skills/x/scripts/x.py
CHANGED
|
@@ -98,6 +98,7 @@ def current_user_id_from_cookies() -> str | None:
|
|
|
98
98
|
|
|
99
99
|
|
|
100
100
|
def make_client():
|
|
101
|
+
import httpx
|
|
101
102
|
from twikit import Client
|
|
102
103
|
patch_twikit_transaction_resolver()
|
|
103
104
|
patch_twikit_model_defaults()
|
|
@@ -107,7 +108,12 @@ def make_client():
|
|
|
107
108
|
or os.environ.get("ALL_PROXY") or os.environ.get("all_proxy")
|
|
108
109
|
or None
|
|
109
110
|
)
|
|
110
|
-
|
|
111
|
+
# twikit builds its httpx.AsyncClient with httpx's 5s default timeout, which
|
|
112
|
+
# trips a ReadTimeout on media uploads (INIT/APPEND/FINALIZE + status poll)
|
|
113
|
+
# from datacenter egress — a text-only tweet is one fast call and squeaks
|
|
114
|
+
# under 5s, but --media does not. Give network ops generous headroom.
|
|
115
|
+
timeout = httpx.Timeout(60.0, connect=15.0)
|
|
116
|
+
client = Client("en-US", proxy=proxy, user_agent=UA, timeout=timeout)
|
|
111
117
|
client.set_cookies(load_cookie_dict())
|
|
112
118
|
return client
|
|
113
119
|
|
|
@@ -494,6 +500,14 @@ def main() -> None:
|
|
|
494
500
|
# twikit scrapes X's non-public API; a bare error here usually means an
|
|
495
501
|
# expired cookie OR that X changed its internal endpoints and twikit
|
|
496
502
|
# needs a compatibility fix.
|
|
503
|
+
import httpx
|
|
504
|
+
if isinstance(e, httpx.TimeoutException):
|
|
505
|
+
die(
|
|
506
|
+
"X request timed out talking to X (network was slow, not an "
|
|
507
|
+
"auth problem) — this is transient, retry the same command. "
|
|
508
|
+
"Timeouts are most common on --media because the image upload "
|
|
509
|
+
"is the slow leg; if it recurs, try a smaller image."
|
|
510
|
+
)
|
|
497
511
|
if "Couldn't get KEY_BYTE indices" in str(e):
|
|
498
512
|
die(
|
|
499
513
|
"X request failed because twikit cannot derive X's current "
|