@@ -63,23 +63,20 @@ func kuwo(keyword string) message.MessageSegment {
63
63
}.Encode ()
64
64
info := gjson .ParseBytes (netGet (search .String (), headers )).Get ("data.list.0" )
65
65
// 获得音乐直链
66
- music , _ := url .Parse ("http://www.kuwo.cn/url " )
66
+ music , _ := url .Parse ("http://www.kuwo.cn/api/v1/www/music/playUrl " )
67
67
music .RawQuery = url.Values {
68
- "format" : []string {"mp3" },
69
- "rid" : []string {fmt .Sprintf ("%d" , info .Get ("rid" ).Int ())},
70
- "response" : []string {"url" },
68
+ "mid" : []string {fmt .Sprintf ("%d" , info .Get ("rid" ).Int ())},
71
69
"type" : []string {"convert_url3" },
72
- "br" : []string {"128kmp3" },
73
- "from" : []string {"web" },
70
+ "br" : []string {"320kmp3" },
74
71
"httpsStatus" : []string {"1" },
75
72
}.Encode ()
76
73
audio := gjson .ParseBytes (netGet (music .String (), headers ))
77
74
// 返回音乐卡片
78
75
return message .CustomMusic (
79
76
fmt .Sprintf ("https://www.kuwo.cn/play_detail/%d" , info .Get ("rid" ).Int ()),
80
- audio .Get ("url" ).Str ,
77
+ audio .Get ("data. url" ).Str ,
81
78
info .Get ("name" ).Str ,
82
- ).Add ("content" , info .Get ("artist" ).Str ).Add ("image" , info .Get ("pic" ).Str )
79
+ ).Add ("content" , info .Get ("artist" ).Str ).Add ("image" , info .Get ("pic" ).Str ). Add ( "subtype" , "kuwo" )
83
80
}
84
81
85
82
// kugou 返回酷狗音乐卡片
@@ -133,7 +130,7 @@ func kugou(keyword string) message.MessageSegment {
133
130
"https://www.kugou.com/song/#hash=" + audio .Get ("hash" ).Str + "&album_id=" + audio .Get ("album_id" ).Str ,
134
131
strings .ReplaceAll (audio .Get ("play_backup_url" ).Str , "\\ /" , "/" ),
135
132
audio .Get ("audio_name" ).Str ,
136
- ).Add ("content" , audio .Get ("author_name" ).Str ).Add ("image" , audio .Get ("img" ).Str )
133
+ ).Add ("content" , audio .Get ("author_name" ).Str ).Add ("image" , audio .Get ("img" ).Str ). Add ( "subtype" , "kugou" )
137
134
}
138
135
139
136
// cloud163 返回网易云音乐卡片
0 commit comments