mirror of
https://github.com/7836246/cursor2api.git
synced 2026-09-03 07:20:02 +08:00
fix: worker 页面改用 domcontentloaded 避免 networkidle 超时
challenge 页面已获取 cookie,worker 页面无需等 networkidle。 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -72,10 +72,11 @@ async function initBrowser() {
|
||||
challengeCount++;
|
||||
|
||||
// ---- Worker 页面:代理 API 请求 ----
|
||||
// cookie 已在 challenge 页面获取,worker 页面只需加载到 domcontentloaded 即可
|
||||
workerPage = await context.newPage();
|
||||
await workerPage.goto(CHALLENGE_URL, {
|
||||
waitUntil: 'networkidle',
|
||||
timeout: 30000,
|
||||
waitUntil: 'domcontentloaded',
|
||||
timeout: 60000,
|
||||
});
|
||||
|
||||
// 注册流式回调(Node.js 侧接收浏览器内 fetch 的数据块)
|
||||
|
||||
Reference in New Issue
Block a user