mirror of
https://github.com/Moe-Sakura/Wrangler-API.git
synced 2026-04-20 21:59:18 +08:00
refactor: 重构紫缘社搜索并移除密码参数
* 移除 `zypassword` 参数,简化核心搜索函数接口。 * 紫缘社搜索逻辑重构,改为解析HTML获取数据,不再依赖API。 * 更新紫缘社平台名称为“紫缘社”,并调整其显示颜色。 * 优化紫缘社搜索结果的标题提取,优先使用中文标题。
This commit is contained in:
@@ -12,7 +12,6 @@ async function handleSearch(request: Request, env: Env, ctx: ExecutionContext, p
|
||||
try {
|
||||
const formData = await request.formData();
|
||||
const game = formData.get("game") as string;
|
||||
const zypassword = formData.get("zypassword") as string || ""; // 获取 zypassword
|
||||
|
||||
|
||||
if (!game || typeof game !== 'string') {
|
||||
@@ -27,7 +26,7 @@ async function handleSearch(request: Request, env: Env, ctx: ExecutionContext, p
|
||||
|
||||
// 将异步任务交给 waitUntil 来处理,确保它能完整执行
|
||||
ctx.waitUntil(
|
||||
handleSearchRequestStream(game.trim(), platforms, writer, zypassword) // 传递 zypassword
|
||||
handleSearchRequestStream(game.trim(), platforms, writer)
|
||||
.catch(err => console.error("Streaming error:", err))
|
||||
.finally(() => writer.close())
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user