@@ -63,23 +63,20 @@ func kuwo(keyword string) message.MessageSegment {
6363 }.Encode ()
6464 info := gjson .ParseBytes (netGet (search .String (), headers )).Get ("data.list.0" )
6565 // 获得音乐直链
66- music , _ := url .Parse ("http://www.kuwo.cn/url " )
66+ music , _ := url .Parse ("http://www.kuwo.cn/api/v1/www/music/playUrl " )
6767 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 ())},
7169 "type" : []string {"convert_url3" },
72- "br" : []string {"128kmp3" },
73- "from" : []string {"web" },
70+ "br" : []string {"320kmp3" },
7471 "httpsStatus" : []string {"1" },
7572 }.Encode ()
7673 audio := gjson .ParseBytes (netGet (music .String (), headers ))
7774 // 返回音乐卡片
7875 return message .CustomMusic (
7976 fmt .Sprintf ("https://www.kuwo.cn/play_detail/%d" , info .Get ("rid" ).Int ()),
80- audio .Get ("url" ).Str ,
77+ audio .Get ("data. url" ).Str ,
8178 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" )
8380}
8481
8582// kugou 返回酷狗音乐卡片
@@ -133,7 +130,7 @@ func kugou(keyword string) message.MessageSegment {
133130 "https://www.kugou.com/song/#hash=" + audio .Get ("hash" ).Str + "&album_id=" + audio .Get ("album_id" ).Str ,
134131 strings .ReplaceAll (audio .Get ("play_backup_url" ).Str , "\\ /" , "/" ),
135132 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" )
137134}
138135
139136// cloud163 返回网易云音乐卡片
0 commit comments