|
@@ -124,16 +124,18 @@ func DeWater(in models.DyJieXiInput) (error, models.DyJieXiOutput) {
|
|
|
fmt.Println(string(ss))
|
|
|
videoStr := string(ss)
|
|
|
//截取字符串
|
|
|
- //comma := strings.Index(videoStr, "\"")
|
|
|
comma = strings.Index(videoStr, "\"")
|
|
|
pos = strings.Index(videoStr[comma+1:], "\">")
|
|
|
|
|
|
fmt.Println(videoStr[comma+1 : pos+comma+1])
|
|
|
- //strings.Index(videoStr[comma:])
|
|
|
- //fmt.Println(videoStr[comma:lastComma])
|
|
|
out.Data.VideoUrl = strings.Replace(videoStr[comma+1:pos+comma+1], "http", "https", 1)
|
|
|
out.Data.VideoUrl = out.Data.VideoUrl + ".mp4"
|
|
|
|
|
|
+ //截取
|
|
|
+ comma = strings.Index(out.Data.VideoUrl, "https://")
|
|
|
+ pos = strings.Index(out.Data.VideoUrl[comma+1:], ".com")
|
|
|
+ fmt.Println(out.Data.VideoUrl[comma+1 : pos+comma+1])
|
|
|
+
|
|
|
return nil, out
|
|
|
|
|
|
}
|