|
@@ -56,12 +56,15 @@ func DeWater(in models.DyJieXiInput) (error, models.DyJieXiOutput) {
|
|
|
|
|
|
res, err := client.Get(baseHost)
|
|
|
if err != nil {
|
|
|
+ fmt.Print(err.Error())
|
|
|
return errors.New(apis.ClientGetFail), out
|
|
|
}
|
|
|
+
|
|
|
n, err := res.Body.Read(p)
|
|
|
fmt.Println("n=", n)
|
|
|
str = res.Header.Get("Location")
|
|
|
- //fmt.Println("res.Body = ", string(p))
|
|
|
+ fmt.Println("res.Body = ", string(p))
|
|
|
+ fmt.Print("str = ", str)
|
|
|
|
|
|
comma := strings.Index(str, "/video/")
|
|
|
pos := strings.Index(str, "/?")
|
|
@@ -116,8 +119,11 @@ func DeWater(in models.DyJieXiInput) (error, models.DyJieXiOutput) {
|
|
|
}
|
|
|
//client.Head()
|
|
|
|
|
|
+ return nil, out
|
|
|
+
|
|
|
res1, err := client1.Get(out.Data.VideoUrl)
|
|
|
if err != nil {
|
|
|
+ fmt.Print(err.Error())
|
|
|
return errors.New(apis.ClientGetFail), out
|
|
|
}
|
|
|
ss, err := ioutil.ReadAll(res1.Body)
|