From f79a7c4071357b42558b0884962fb92643787866 Mon Sep 17 00:00:00 2001 From: rosethornbush <31735267+rosethornbush@users.noreply.github.com> Date: Mon, 22 Jun 2026 19:59:43 -0700 Subject: [PATCH] fix(platforms): avoid tiktok media probes --- packages/platforms/src/platforms/tiktok.ts | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/packages/platforms/src/platforms/tiktok.ts b/packages/platforms/src/platforms/tiktok.ts index 31390da..5b8dcfd 100644 --- a/packages/platforms/src/platforms/tiktok.ts +++ b/packages/platforms/src/platforms/tiktok.ts @@ -10,18 +10,8 @@ const FOLLOWUP_RE = async function parseMedia(raw: Record): Promise { if (raw.video) { const urls = raw.video.PlayAddrStruct?.UrlList ?? []; - for (const url of urls) { - const video = await fetch(url, { - method: "GET", - redirect: "follow", - headers: { - Range: "bytes=0-0", - }, - }); - await video.body?.cancel(); - if (!video.ok || !video.headers.get("Content-Type")?.startsWith("video/")) continue; - return [{ url, type: "video" }]; - } + const videoURL = urls.find((url: string) => url.includes("/aweme/v1/play/")) ?? urls[0]; + if (videoURL) return [{ url: videoURL, type: "video" }]; } return []; }