github-actions[bot] commited on
Commit
24965e4
·
1 Parent(s): 8727c8f

Update from GitHub Actions

Browse files
Files changed (1) hide show
  1. src/index.ts +3 -3
src/index.ts CHANGED
@@ -195,15 +195,15 @@ app.get('/genspark', async (c) => {
195
  await gensparkContext.clearCookies()
196
  await gensparkContext.addCookies(cookies);
197
  }
198
- await new Promise(resolve => setTimeout(resolve, 1000));
199
  const gensparkPage = await gensparkContext.newPage()
200
- try {
201
  //刷新页面以确保获取新令牌
202
  await gensparkPage.goto('https://www.genspark.ai/agents?type=moa_chat', {
203
  waitUntil: 'networkidle',
204
  timeout: 3600000
205
  })
206
- await new Promise(resolve => setTimeout(resolve, 1000));
207
  // 执行脚本获取令牌
208
  const token = await gensparkPage.evaluate(() => {
209
  return new Promise((resolve, reject) => {
 
195
  await gensparkContext.clearCookies()
196
  await gensparkContext.addCookies(cookies);
197
  }
198
+ await new Promise(resolve => setTimeout(resolve, 1000));
199
  const gensparkPage = await gensparkContext.newPage()
200
+ try {
201
  //刷新页面以确保获取新令牌
202
  await gensparkPage.goto('https://www.genspark.ai/agents?type=moa_chat', {
203
  waitUntil: 'networkidle',
204
  timeout: 3600000
205
  })
206
+ await new Promise(resolve => setTimeout(resolve, 1000));
207
  // 执行脚本获取令牌
208
  const token = await gensparkPage.evaluate(() => {
209
  return new Promise((resolve, reject) => {