tt-help-cli-ycl 1.3.62 → 1.3.64
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/scripts/run-explore.bat +1 -1
- package/src/cli/explore.js +8 -4
- package/src/cli/refresh.js +437 -163
- package/src/lib/args.js +54 -8
- package/src/lib/browser/cdp.js +11 -5
- package/src/lib/browser/page.js +41 -0
- package/src/lib/constants.js +31 -9
- package/src/main.js +3 -0
- package/src/npm-main.js +3 -0
- package/src/watch/data-store.js +145 -9
- package/src/watch/public/app.js +296 -42
- package/src/watch/public/index.html +63 -0
- package/src/watch/public/style.css +80 -3
- package/src/watch/server.js +91 -2
- package/src/scraper/refresh-core.js +0 -213
package/package.json
CHANGED
package/scripts/run-explore.bat
CHANGED
|
@@ -131,4 +131,4 @@ ECHO Max following: 5
|
|
|
131
131
|
ECHO Max followers: 5
|
|
132
132
|
ECHO Speed: stealth (slowest)
|
|
133
133
|
ECHO ========================================
|
|
134
|
-
CALL tt-help explore stealth --user-id %%USER_ID%% --base-port %%BASE_PORT%% --port-count %%PORT_COUNT%% --max-following
|
|
134
|
+
CALL tt-help explore stealth --user-id %%USER_ID%% --base-port %%BASE_PORT%% --port-count %%PORT_COUNT%% --max-following 100 --max-followers 100 %%JOB_LOC_ARGS%%
|
package/src/cli/explore.js
CHANGED
|
@@ -78,6 +78,7 @@ export async function handleExplore(options) {
|
|
|
78
78
|
explorePortCount,
|
|
79
79
|
exploreUserId,
|
|
80
80
|
exploreMaxVideos,
|
|
81
|
+
exploreProxy,
|
|
81
82
|
} = options;
|
|
82
83
|
|
|
83
84
|
let userId = exploreUserId || configuredUserId;
|
|
@@ -150,6 +151,10 @@ export async function handleExplore(options) {
|
|
|
150
151
|
cdpOptions.userDataDir = currentAccount.userDataDir;
|
|
151
152
|
}
|
|
152
153
|
|
|
154
|
+
if (exploreProxy) {
|
|
155
|
+
cdpOptions.proxyServer = exploreProxy;
|
|
156
|
+
}
|
|
157
|
+
|
|
153
158
|
console.error(`CDP 端口: ${cdpOptions.port}, 用户编号: ${userId}`);
|
|
154
159
|
console.error(`浏览器配置: ${path.basename(cdpOptions.userDataDir)}`);
|
|
155
160
|
if (!explorePort) {
|
|
@@ -161,7 +166,7 @@ export async function handleExplore(options) {
|
|
|
161
166
|
|
|
162
167
|
browser = await ensureBrowserReadyCDP(cdpOptions);
|
|
163
168
|
const { processExplore } = await import("../scraper/explore-core.js");
|
|
164
|
-
const {
|
|
169
|
+
const { safeCheckLogin } = await import("../lib/browser/page.js");
|
|
165
170
|
|
|
166
171
|
const page = await getOrCreatePage(browser);
|
|
167
172
|
|
|
@@ -171,8 +176,7 @@ export async function handleExplore(options) {
|
|
|
171
176
|
});
|
|
172
177
|
|
|
173
178
|
// 检测登录状态(启动时只检测一次)
|
|
174
|
-
let loggedIn = await
|
|
175
|
-
console.error(`登录状态: ${loggedIn ? "已登录" : "未登录"}`);
|
|
179
|
+
let loggedIn = await safeCheckLogin(page);
|
|
176
180
|
|
|
177
181
|
// 全局拦截图片资源,减少内存占用和加载时间
|
|
178
182
|
await page.route("**/*", (route) => {
|
|
@@ -219,7 +223,7 @@ export async function handleExplore(options) {
|
|
|
219
223
|
await page.goto(STARTUP_TIKTOK_URL, {
|
|
220
224
|
waitUntil: "domcontentloaded",
|
|
221
225
|
});
|
|
222
|
-
loggedIn = await
|
|
226
|
+
loggedIn = await safeCheckLogin(page);
|
|
223
227
|
console.error(
|
|
224
228
|
`[健康检查] 新账户登录状态: ${loggedIn ? "已登录" : "未登录"}`,
|
|
225
229
|
);
|