claude-codex-wechat 0.1.60 → 0.1.61
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.
|
@@ -31,6 +31,7 @@ const PLAYER_VIRTUAL_TIME_MS = 15_000;
|
|
|
31
31
|
const PLAYER_ATTEMPTS = 2;
|
|
32
32
|
const MAX_DOM_BYTES = 2 * 1024 * 1024;
|
|
33
33
|
const ALLOWED_VIDEO_HOST_SUFFIXES = [".douyinvod.com", ".douyin.com", ".snssdk.com"];
|
|
34
|
+
const ALLOWED_VIDEO_HOSTS = new Set(["v3-dy-o.zjcdn.com"]);
|
|
34
35
|
|
|
35
36
|
// ─── 带重试/超时的 fetch ─────────────────────────────────────────────────────
|
|
36
37
|
|
|
@@ -159,7 +160,9 @@ export function parseOfficialVideoUrl(dom) {
|
|
|
159
160
|
}
|
|
160
161
|
|
|
161
162
|
const allowed =
|
|
162
|
-
url.protocol === "https:" &&
|
|
163
|
+
url.protocol === "https:" &&
|
|
164
|
+
(ALLOWED_VIDEO_HOSTS.has(url.hostname) ||
|
|
165
|
+
ALLOWED_VIDEO_HOST_SUFFIXES.some((suffix) => url.hostname.endsWith(suffix)));
|
|
163
166
|
if (!allowed) throw new Error(`抖音官方播放器返回了非预期的视频域名:${url.hostname}`);
|
|
164
167
|
return url.toString();
|
|
165
168
|
}
|