github-actions[bot] commited on
Commit
bf4a03c
·
1 Parent(s): 1032a0c

Update from GitHub Actions

Browse files
Files changed (1) hide show
  1. src/index.ts +1 -11
src/index.ts CHANGED
@@ -225,7 +225,7 @@ app.get('/genspark', async (c) => {
225
  })
226
 
227
  // 等待并模拟人类交互
228
- await gensparkPage.waitForTimeout(Math.random() * 2000 + 1000)
229
 
230
  // 随机鼠标移动
231
  await gensparkPage.mouse.move(
@@ -243,16 +243,6 @@ app.get('/genspark', async (c) => {
243
  // 等待输入框出现
244
  await gensparkPage.waitForSelector(inputSelector, { state: 'visible', timeout: 5000 });
245
  gensparkPage.focus(inputSelector);
246
- // 模拟逐字输入(更像人类)
247
- const testMessage = '模拟真实输入过程';
248
- for (let char of testMessage) {
249
- await gensparkPage.type(inputSelector, char, {
250
- delay: Math.random() * 100 + 50 // 随机延迟,模拟打字速度
251
- });
252
- await gensparkPage.waitForTimeout(Math.random() * 200); // 额外随机等待
253
- }
254
- await gensparkPage.fill(inputSelector, '');
255
- await gensparkPage.waitForTimeout(Math.random() * 1500 + 500)
256
  // 可选:触发搜索/提交
257
  await gensparkPage.keyboard.press('Enter');
258
 
 
225
  })
226
 
227
  // 等待并模拟人类交互
228
+ await gensparkPage.waitForTimeout(Math.random() * 1500 + 1000)
229
 
230
  // 随机鼠标移动
231
  await gensparkPage.mouse.move(
 
243
  // 等待输入框出现
244
  await gensparkPage.waitForSelector(inputSelector, { state: 'visible', timeout: 5000 });
245
  gensparkPage.focus(inputSelector);
 
 
 
 
 
 
 
 
 
 
246
  // 可选:触发搜索/提交
247
  await gensparkPage.keyboard.press('Enter');
248