From 45335ba958f5ddc76e1b84e91f5662e6d9e8e518 Mon Sep 17 00:00:00 2001 From: ByteDream Date: Sat, 14 Nov 2020 00:57:50 +0100 Subject: [PATCH] Updated vivo.go --- vivo.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vivo.go b/vivo.go index 518c24a..5dc0c83 100644 --- a/vivo.go +++ b/vivo.go @@ -10,6 +10,7 @@ import ( "strings" ) +//Vivo is the base struct where all information about a vivo.x video are saved type Vivo struct { VivoURL string VideoURL string @@ -37,7 +38,7 @@ func GetVideo(URL string) (Vivo, error) { } bodyAsString := string(bodyAsBytes) - parameter := regexp.MustCompile("(?s)InitializeStream\\s*\\(\\s*(\\{.+?})\\s*\\)\\s*;").FindString(bodyAsString) + parameter := regexp.MustCompile("(?s)InitializeStream\\s*\\(\\s*({.+?})\\s*\\)\\s*;").FindString(bodyAsString) parameter = strings.NewReplacer("\n", "", "\t", "", "InitializeStream ({", "", "});", "", "'", "\"").Replace(strings.TrimSpace(parameter)) vivo := Vivo{VivoURL: URL,