From d658dbbb0c29da3a534869c4a5cb0d992dc95e63 Mon Sep 17 00:00:00 2001 From: gan-of-culture Date: Tue, 27 Dec 2022 10:58:24 +0100 Subject: [PATCH] [FIX] hstream.moe: updated source URL regex --- extractors/hentaidude/hentaidude_test.go | 2 +- extractors/hstream/hstream.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/extractors/hentaidude/hentaidude_test.go b/extractors/hentaidude/hentaidude_test.go index f593a1f..a48b616 100755 --- a/extractors/hentaidude/hentaidude_test.go +++ b/extractors/hentaidude/hentaidude_test.go @@ -19,7 +19,7 @@ func TestParseURL(t *testing.T) { }, { Name: "Landing page", URL: "https://hentaidude.com/", - Want: 20, + Want: 30, }, { Name: "Orderby", URL: "https://hentaidude.com/?orderby=date", diff --git a/extractors/hstream/hstream.go b/extractors/hstream/hstream.go index 3628fed..d5717ec 100644 --- a/extractors/hstream/hstream.go +++ b/extractors/hstream/hstream.go @@ -13,8 +13,8 @@ import ( const site = "https://hstream.moe/" -var reVideoSources = regexp.MustCompile(`https://stream.hstream.moe/\d+/[\w.]+/[\w./]+\.(?:mp4|webm)`) -var reCaptionSource = regexp.MustCompile(`https://stream.hstream.moe/\d+/[\w.]+/[\w./]+\.ass`) +var reVideoSources = regexp.MustCompile(`https://.+/\d+/[\w.]+/[\w./]+\.(?:mp4|webm)`) +var reCaptionSource = regexp.MustCompile(`https://.+/\d+/[\w.]+/[\w./]+\.ass`) type extractor struct{}