fix(sxyprn): diagnostyka gate'owała resolve na false-positive challenge
Some checks are pending
Backend tests / test (push) Waiting to run

REGRESJA z 3355372 (diagnostyka sxyprn): wzorzec challenge sprawdzany PRZED
data-vnfo, a 'challenge-platform' to skrypt Cloudflare JSD wstrzykiwany do KAŻDEJ
strony za CF (bez challenge) → false positive na DOBRYCH stronach → return [] →
phone-resolve padał wszystkim → fallback backend/proxy → CAŁE wideo przez VPS
(potwierdzone: 49MB/chunk na trafficdeposit) + WebView z reklamami.

Fix: najpierw prawdziwy sygnał (data-vnfo), diagnoza powodu DOPIERO gdy go brak.
'challenge-platform' usunięty z listy (za szeroki). Diagnostyka znów czysto
obserwacyjna — nie przerywa resolve na heurystyce tekstowej.

Wykryte przez samą diagnostykę: sxyprn=challenge_197503b / challenge_75831b
(197KB/75KB = pełne strony, nie interstitiale).
This commit is contained in:
goon-foss 2026-07-26 16:12:14 +02:00
parent 33553729f8
commit 4e8acd21b0

View file

@ -91,21 +91,25 @@ export async function resolveSxyprnPage(pageUrl: string): Promise<StreamLink[]>
_diag('fetch_error'); _diag('fetch_error');
return []; return [];
} }
// Challenge / ad-gate: gdy user dostaje CF/turnstile albo interstitial zamiast strony // DIAGNOSTYKA MUSI BYĆ CZYSTO OBSERWACYJNA — najpierw prawdziwy sygnał (data-vnfo),
// z playerem, resolve pada i coś w fallbacku pokazuje reklamę. To najbardziej // dopiero potem "dlaczego nie ma". Wcześniejsza wersja gate'owała na wzorcu challenge
// podejrzana ścieżka dla "ładuje reklamy" (region/IP-specific). // PRZED sprawdzeniem vnfo, a `challenge-platform` to skrypt Cloudflare JSD wstrzykiwany
if (/cf-challenge|challenge-platform|turnstile|Just a moment|Attention Required|Checking your browser/i.test(html)) { // do KAŻDEJ strony za CF (bez żadnego challenge) → false positive → return [] na DOBRYCH
_diag(`challenge_${html.length}b`); // stronach → phone-resolve padał wszystkim → WebView z reklamami. Regresja 2026-07-22,
return []; // naprawiona 2026-07-26. Nigdy nie przerywaj resolve na podstawie heurystyki tekstowej.
} const m = _VNFO_RE.exec(html);
if (!m) {
if (html.includes('Post Not Found')) { if (html.includes('Post Not Found')) {
_diag('post_not_found'); // usunięty post _diag('post_not_found'); // usunięty post
return []; return [];
} }
const m = _VNFO_RE.exec(html); // Brak vnfo → DOPIERO teraz diagnozuj powód. Prawdziwy challenge (nie JSD-script):
if (!m) { // interstitial CF/Turnstile zamiast strony z playerem.
// Brak data-vnfo: albo zmiana struktury, albo user dostał inną stronę (ad-gate). if (/cf-challenge|turnstile|Just a moment|Attention Required|Checking your browser/i.test(html)) {
// Długość HTML rozróżnia "pełna strona bez vnfo" od "krótki interstitial". _diag(`challenge_${html.length}b`);
return [];
}
// Pełna strona bez vnfo (zmiana struktury) vs krótki interstitial — rozróżnia długość.
_diag(`no_vnfo_${html.length}b`); _diag(`no_vnfo_${html.length}b`);
return []; return [];
} }