@@ -100,7 +100,6 @@ func RequestBefore(request *http.Request) *Netease {
100100 decryptECBBytes , _ := crypto .AesDecryptECB (requestBodyH [:length ], []byte (linuxApiKey ))
101101 var result common.MapType
102102 result = utils .ParseJson (decryptECBBytes )
103- //log.Println(utils.ToJson(result))
104103 urlM , ok := result ["url" ].(string )
105104 if ok {
106105 netease .Path = urlM
@@ -109,9 +108,6 @@ func RequestBefore(request *http.Request) *Netease {
109108 if ok {
110109 netease .Params = params
111110 }
112-
113- //log.Println("forward")
114- //log.Printf("path:%s \nparams:%s\n", netease.Path, netease.Params)
115111 } else if len (requestBody ) > 7 {
116112 requestBodyH := make ([]byte , len (requestBody ))
117113 length , _ := hex .Decode (requestBodyH , requestBody [7 :len (requestBody )- len (pad )])
@@ -120,9 +116,7 @@ func RequestBefore(request *http.Request) *Netease {
120116 data := strings .Split (decryptString , "-36cd479b6b5-" )
121117 netease .Path = data [0 ]
122118 netease .Params = utils .ParseJson (bytes .NewBufferString (data [1 ]).Bytes ())
123- // log.Println(utils.ToJson(netease))
124- //log.Printf("path:%s \nparams:%s\n", netease.Path, netease.Params)
125- }
119+ }
126120 netease .Path = strings .ReplaceAll (netease .Path , "https://music.163.com" , "" )
127121 netease .Path = strings .ReplaceAll (netease .Path , "http://music.163.com" , "" )
128122 netease .Path = utils .ReplaceAll (netease .Path , `\/\d*$` , "" )
@@ -154,7 +148,6 @@ func RequestAfter(request *http.Request, response *http.Response, netease *Netea
154148 pass := false
155149 if _ , ok := Path [netease .Path ]; ok {
156150 pass = true
157- //log.Println(utils.ToJson(netease))
158151 }
159152 if pass && response .StatusCode == 200 {
160153
@@ -172,7 +165,6 @@ func RequestAfter(request *http.Request, response *http.Response, netease *Netea
172165 if enableGzip {
173166 decryptECBBytes , _ = utils .UnGzip (decryptECBBytes )
174167 }
175- //log.Println(string(decryptECBBytes), netease)
176168 aeskey := eApiKey
177169 if netease .Forward {
178170 aeskey = linuxApiKey
@@ -182,16 +174,12 @@ func RequestAfter(request *http.Request, response *http.Response, netease *Netea
182174 result := utils .ParseJson (decryptECBBytes )
183175 netease .JsonBody = result
184176
185- //if strings.Contains(netease.Path,"batch"){
186- // log.Println(utils.ToJson(netease))
187- //}
188177 modified := false
189178 codeN , ok := netease .JsonBody ["code" ].(json.Number )
190179 code := "200"
191180 if ok {
192181 code = codeN .String ()
193182 }
194- //log.Println(utils.ToJson(netease))
195183 if ! netease .Web && (code == "401" || code == "512" ) && strings .Contains (netease .Path , "manipulate" ) {
196184 modified = tryCollect (netease , request )
197185 } else if ! netease .Web && (code == "401" || code == "512" ) && strings .EqualFold (netease .Path , "/api/song/like" ) {
0 commit comments