mirror of
https://github.com/bytedream/vivo.git
synced 2025-05-09 20:25:09 +02:00
Updated vivo.go
This commit is contained in:
parent
1b4ece1690
commit
45335ba958
3
vivo.go
3
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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user