From 45dcd0af80bdb338db3e438f6e0e6a45bfa4c73e Mon Sep 17 00:00:00 2001 From: sruusk <57395313+sruusk@users.noreply.github.com> Date: Sun, 12 Jan 2025 03:55:04 +0200 Subject: [PATCH] fix: remove cf check --- src/player.ts | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/player.ts b/src/player.ts index 8b93daf..d54ae86 100644 --- a/src/player.ts +++ b/src/player.ts @@ -56,12 +56,6 @@ export async function getPlayer( const originResponse = await hero.goto(origin, { timeoutMs: this.timeout }); const { statusCode } = originResponse.response; if (statusCode !== 200) { - // Check for cloudflare challenge - const title = hero.document.querySelector('title'); - if (title !== undefined && (await title.textContent) === 'Attention Required! | Cloudflare') { - throw new Error(`play.esea.net returned a non-200 response: ${statusCode} - Received cloudflare challenge. This is likely caused by an untrusted IP.`); - } // noinspection ExceptionCaughtLocallyJS throw new Error(`play.esea.net returned a non-200 response: ${statusCode}`); } @@ -164,12 +158,6 @@ export async function getPlayerFromSteamId64( const originResponse = await hero.goto(origin, { timeoutMs: this.timeout }); const { statusCode } = originResponse.response; if (statusCode !== 200) { - // Check for cloudflare challenge - const title = hero.document.querySelector('title'); - if (title && (await title.textContent) === 'Attention Required! | Cloudflare') { - throw new Error(`play.esea.net returned a non-200 response: ${statusCode} - Received cloudflare challenge. This is likely caused by an untrusted IP.`); - } // noinspection ExceptionCaughtLocallyJS throw new Error(`play.esea.net returned a non-200 response: ${statusCode}`); }