Skip to content
Snippets Groups Projects
Commit 000dabf1 authored by Silvan's avatar Silvan
Browse files

fix hand-shaking code

parent 7664b2b5
No related branches found
No related tags found
No related merge requests found
...@@ -58,7 +58,7 @@ var ( ...@@ -58,7 +58,7 @@ var (
"/api/song/enhance/privilege": 1, "/api/song/enhance/privilege": 1,
} }
// "header key" : { "contain value":"protocol"} // "header key" : { "contain value":"protocol"}
ReRulesUnderHeader = map[string]map[string]string{"os": {"pc": "https"}} ReRulesUnderHeader = map[string]map[string]string{"os": {"pc": "http"}}
) )
type Netease struct { type Netease struct {
...@@ -523,6 +523,7 @@ func processMapJson(jsonMap common.MapType) bool { ...@@ -523,6 +523,7 @@ func processMapJson(jsonMap common.MapType) bool {
func generateEndpoint(netease *Netease) string { func generateEndpoint(netease *Netease) string {
protocol := "https" protocol := "https"
endPoint := "://music.163.com/unblockmusic/" endPoint := "://music.163.com/unblockmusic/"
//fmt.Println(fmt.Sprintf("%+v\n", netease.Params))
if headerIntf, ok := netease.Params["header"]; ok { if headerIntf, ok := netease.Params["header"]; ok {
header := make(map[string]interface{}) header := make(map[string]interface{})
if headerStr, ok := headerIntf.(string); ok { if headerStr, ok := headerIntf.(string); ok {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment