tt-help-cli-ycl 1.3.97 → 1.3.98
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/src/cli/tag.js +2 -5
package/package.json
CHANGED
package/src/cli/tag.js
CHANGED
|
@@ -759,6 +759,8 @@ export async function handleScoreAll(parsed) {
|
|
|
759
759
|
result.error = "no videos found";
|
|
760
760
|
await reportToServer(baseUrl, result, clientId, clientMeta);
|
|
761
761
|
totalScored++;
|
|
762
|
+
// 随机等待 3-7 秒,避免连续访问 TikTok 触发风控
|
|
763
|
+
await randomDelay(0, 5000);
|
|
762
764
|
// 导航到 about:blank 释放页面状态再跳过
|
|
763
765
|
await page
|
|
764
766
|
.goto("about:blank", {
|
|
@@ -766,7 +768,6 @@ export async function handleScoreAll(parsed) {
|
|
|
766
768
|
timeout: 5000,
|
|
767
769
|
})
|
|
768
770
|
.catch(() => {});
|
|
769
|
-
process.stderr.write(` → page=${page.url()}\n`);
|
|
770
771
|
continue;
|
|
771
772
|
}
|
|
772
773
|
|
|
@@ -843,16 +844,12 @@ export async function handleScoreAll(parsed) {
|
|
|
843
844
|
);
|
|
844
845
|
log("");
|
|
845
846
|
|
|
846
|
-
// 随机等待 3-7 秒,避免连续访问 TikTok 触发风控
|
|
847
|
-
await randomDelay(3000, 7000);
|
|
848
|
-
|
|
849
847
|
// 导航到 about:blank 卸载页面,状态清零,下次 goto 重新初始化
|
|
850
848
|
await page
|
|
851
849
|
.goto("about:blank", { waitUntil: "domcontentloaded", timeout: 5000 })
|
|
852
850
|
.catch((e) => {
|
|
853
851
|
log(` ⚠️ about:blank 跳转失败: ${e.message}`);
|
|
854
852
|
});
|
|
855
|
-
process.stderr.write(` → page=${page.url()}\n`);
|
|
856
853
|
await randomDelay(3000, 7000);
|
|
857
854
|
} catch (e) {
|
|
858
855
|
// 区分网络错误和业务错误
|