This commit is contained in:
Yanlong Wang 2025-04-17 10:10:58 +08:00
parent 48cff2b974
commit ec9f0826ac
No known key found for this signature in database
GPG Key ID: C0A623C0BADF9F37

View File

@ -133,7 +133,7 @@ export class SerpHost extends RPCHost {
@Param('num', { validate: (v: number) => v >= 0 && v <= 20 }) @Param('num', { validate: (v: number) => v >= 0 && v <= 20 })
num?: number, num?: number,
@Param('gl', { validate: (v: string) => WORLD_COUNTRY_CODES.includes(v?.toLowerCase()) }) gl?: string, @Param('gl', { validate: (v: string) => WORLD_COUNTRY_CODES.includes(v?.toLowerCase()) }) gl?: string,
@Param('hl', { validate: (v: string) => WORLD_LANGUAGES.some(l => l.code === v) }) hl?: string, @Param('hl', { validate: (v: string) => WORLD_LANGUAGES.some(l => l.code === v) }) _hl?: string,
@Param('location') location?: string, @Param('location') location?: string,
@Param('page') page?: number, @Param('page') page?: number,
@Param('fallback') fallback?: boolean, @Param('fallback') fallback?: boolean,
@ -294,7 +294,7 @@ export class SerpHost extends RPCHost {
q, q,
num, num,
gl, gl,
hl, // hl,
location, location,
page, page,
}, crawlerOptions); }, crawlerOptions);
@ -324,7 +324,7 @@ export class SerpHost extends RPCHost {
q: realQuery, q: realQuery,
num, num,
gl, gl,
hl, // hl,
location, location,
}, crawlerOptions); }, crawlerOptions);
if (results?.length) { if (results?.length) {
@ -341,7 +341,7 @@ export class SerpHost extends RPCHost {
q: realQuery, q: realQuery,
num, num,
gl, gl,
hl, // hl,
location, location,
}, crawlerOptions); }, crawlerOptions);
} }