k.zhang 4 年之前
父节点
当前提交
152a436d71
共有 1 个文件被更改,包括 4 次插入2 次删除
  1. 4 2
      apis/dyjx/url_jx.go

+ 4 - 2
apis/dyjx/url_jx.go

@@ -84,9 +84,9 @@ func DeWater(in models.DyJieXiInput) (error, models.DyJieXiOutput) {
 	}
 
 	//视频url
-	var videoUrl = inData.ItemList[0].Video.PlayAddr.URLList[0]
+	//var videoUrl = inData.ItemList[0].Video.PlayAddr.URLList[0]
 
-	out.Data.VideoUrl = strings.Replace(videoUrl, "playwm", "play", 1)
+	//out.Data.VideoUrl = strings.Replace(videoUrl, "playwm", "play", 1)
 	//音频url
 
 	out.Data.AudioUrl = inData.ItemList[0].Music.PlayURL.URI
@@ -131,6 +131,8 @@ func DeWater(in models.DyJieXiInput) (error, models.DyJieXiOutput) {
 	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"
 
 	return nil, out