From dc91c51e8b6d32167fb953b976beb45c6deaa3fa Mon Sep 17 00:00:00 2001 From: GSTAR <44748406+GLlgGL@users.noreply.github.com> Date: Mon, 1 Dec 2025 00:28:35 +0100 Subject: [PATCH] Update TurboVidPlay.ts Last fix. --- src/extractor/TurboVidPlay.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/extractor/TurboVidPlay.ts b/src/extractor/TurboVidPlay.ts index 5ec534b..09d0ad4 100644 --- a/src/extractor/TurboVidPlay.ts +++ b/src/extractor/TurboVidPlay.ts @@ -51,10 +51,13 @@ export class TurboVidPlay extends Extractor { throw new NotFoundError(); } - const match = html.match(/(?:urlPlay|data-hash)\s*=\s*['"](?[^"']+)/); + // Extract media URL via named capture group + const match = html.match( + /(?:urlPlay|data-hash)\s*=\s*['"](?[^"']+)/, + ); - const mediaUrl - = match?.groups?.url; + const groups = match?.groups as Record | undefined; + const mediaUrl = groups?.['url']; if (!mediaUrl) { throw new NotFoundError('Video link not found'); @@ -98,7 +101,7 @@ export class TurboVidPlay extends Extractor { } } } catch { - // intentionally ignored + // Ignore playlist parsing errors } const $ = cheerio.load(html);