From e7a93fcc18d465dee7f77e01f3d9f9a2b1206092 Mon Sep 17 00:00:00 2001 From: Samantaz Fox Date: Sat, 9 Nov 2024 22:39:26 +0100 Subject: [PATCH] API: Replace any URL in HLS manifests --- src/invidious/routes/api/manifest.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/invidious/routes/api/manifest.cr b/src/invidious/routes/api/manifest.cr index 5439e604..f4cfa446 100644 --- a/src/invidious/routes/api/manifest.cr +++ b/src/invidious/routes/api/manifest.cr @@ -170,7 +170,7 @@ module Invidious::Routes::API::Manifest manifest = response.body if local - manifest = manifest.gsub(/^https:\/\/\w+---.{11}\.c\.youtube\.com[^\n]*/m) do |match| + manifest = manifest.gsub(/https:\/\/[^\n"]*/m) do |match| uri = URI.parse(match) path = uri.path