From 68cfa65135b76ba054c33cd08350473967a6a078 Mon Sep 17 00:00:00 2001 From: WebStreamr <210764791+webstreamr@users.noreply.github.com> Date: Sat, 29 Nov 2025 12:37:35 +0000 Subject: [PATCH] fix: use correct fetch for FlareSolverr --- src/utils/Fetcher.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/utils/Fetcher.ts b/src/utils/Fetcher.ts index ac0f731..f180bd4 100644 --- a/src/utils/Fetcher.ts +++ b/src/utils/Fetcher.ts @@ -219,9 +219,8 @@ export class Fetcher { this.logger.info(`Query FlareSolverr for ${url.href}`, ctx); - const body = { cmd: 'request.get', url: url.href, session: 'default' }; - // @ts-expect-error idjaow awdiajwdoajwdoiajwdoi - const challengeResult = await (await this.queuedFetch(ctx, new URL(flareSolverrEndpoint), { method: 'POST', body: JSON.stringify(body), headers: { 'Content-Type': 'application/json' }, queueLimit: 1, timeout: 15000 })).json() as FlareSolverrResult; + const data = { cmd: 'request.get', url: url.href, session: 'default' }; + const challengeResult = (await this.queuedFetch(ctx, new URL(flareSolverrEndpoint), { method: 'POST', data, headers: { 'Content-Type': 'application/json' }, queueLimit: 1, timeout: 15000 })).data as FlareSolverrResult; if (challengeResult.status !== 'ok') { this.logger.warn(`FlareSolverr issue: ${JSON.stringify(challengeResult)}`, ctx); throw new BlockedError(url, BlockedReason.flaresolverr_failed, {});