Spaces:
Sleeping
Sleeping
github-actions[bot]
commited on
Commit
·
cd9af8b
1
Parent(s):
c76a8db
Update from GitHub Actions
Browse files- src/index.ts +0 -30
src/index.ts
CHANGED
@@ -69,34 +69,6 @@ async function initGensparkPage(cookies?: any[]) {
|
|
69 |
get: () => userAgent.replace('HeadlessChrome', 'Chrome'),
|
70 |
});
|
71 |
}
|
72 |
-
|
73 |
-
// 添加语言和插件,使其看起来更像真实浏览器
|
74 |
-
Object.defineProperty(navigator, 'languages', {
|
75 |
-
get: () => ['en-US', 'en', 'zh-CN'],
|
76 |
-
});
|
77 |
-
|
78 |
-
// 添加假的插件信息
|
79 |
-
Object.defineProperty(navigator, 'plugins', {
|
80 |
-
get: () => {
|
81 |
-
return [
|
82 |
-
{
|
83 |
-
description: "Portable Document Format",
|
84 |
-
filename: "internal-pdf-viewer",
|
85 |
-
name: "Chrome PDF Plugin"
|
86 |
-
},
|
87 |
-
{
|
88 |
-
description: "Portable Document Format",
|
89 |
-
filename: "mhjfbmdgcfjbbpaeojofohoefgiehjai",
|
90 |
-
name: "Chrome PDF Viewer"
|
91 |
-
},
|
92 |
-
{
|
93 |
-
description: "Widevine Content Decryption Module",
|
94 |
-
filename: "widevinecdmadapter.dll",
|
95 |
-
name: "Widevine Content Decryption Module"
|
96 |
-
}
|
97 |
-
];
|
98 |
-
},
|
99 |
-
});
|
100 |
});
|
101 |
|
102 |
// 首次加载页面
|
@@ -232,8 +204,6 @@ app.get('/', async (c) => {
|
|
232 |
}
|
233 |
})
|
234 |
|
235 |
-
let lastCookies = null
|
236 |
-
|
237 |
// 修改点 2: 添加 /genspark 路由来获取reCAPTCHA令牌
|
238 |
app.get('/genspark', async (c) => {
|
239 |
try {
|
|
|
69 |
get: () => userAgent.replace('HeadlessChrome', 'Chrome'),
|
70 |
});
|
71 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
72 |
});
|
73 |
|
74 |
// 首次加载页面
|
|
|
204 |
}
|
205 |
})
|
206 |
|
|
|
|
|
207 |
// 修改点 2: 添加 /genspark 路由来获取reCAPTCHA令牌
|
208 |
app.get('/genspark', async (c) => {
|
209 |
try {
|