From 9797957778c4ce262d157ba2f3e62bb41d57148a Mon Sep 17 00:00:00 2001 From: WebStreamr <210764791+webstreamr@users.noreply.github.com> Date: Wed, 11 Jun 2025 08:23:58 +0000 Subject: [PATCH] fix(handler): avoid creating invalid URLs in KinoGer --- src/handler/KinoGer.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/handler/KinoGer.ts b/src/handler/KinoGer.ts index d66fb3b..65c9814 100644 --- a/src/handler/KinoGer.ts +++ b/src/handler/KinoGer.ts @@ -56,12 +56,12 @@ export class KinoGer implements Handler { return; } - const url = urlsMatch[1].split(',')[episodeIndex]; - if (!url) { + const urlMatch = (urlsMatch[1].split(',')[episodeIndex] ?? '').match(/https?:\/\/[^\s'"<>]+/); + if (!urlMatch) { return; } - episodeUrl = new URL(url.replaceAll('[', '').replaceAll('\'', '').trim()); + episodeUrl = new URL(urlMatch[0]); }); return episodeUrl;