接口地址: music.woshidie.com/index/music/kugou/id/

返回格式: json

请求方式: GET

请求示例: music.woshidie.com/index/music/kugou/id/music.woshidie.com/index/music/kugou/id/1000

请求参数说明:

名称 必填 类型 说明
id id id 歌单ID

返回参数说明:

名称 类型 说明
name json 歌名
artist json 歌手
url json 音乐文件
cover json 音乐图片
lrc json 音乐歌词

返回示例:

[{"name":"不要说话","artist":"陈奕迅","url":"http://api.lanhuiw.cn/index/music/kgurl?id=08228af3cb404e8a4e7e9871bf543ff6","cover":"http://api.lanhuiw.cn/index/music/kgcover?id=08228af3cb404e8a4e7e9871bf543ff6","lrc":"http://api.lanhuiw.cn/index/music/kglrc?id=08228af3cb404e8a4e7e9871bf543ff6"},]

代码示例:

<div id="player" class="aplayer"></div> <link rel="stylesheet" href="https://cdn.bootcss.com/aplayer/1.10.1/APlayer.min.css" /> <script src="https://cdn.bootcss.com/jquery/3.5.0/jquery.min.js"></script> <script src="https://cdn.bootcss.com/aplayer/1.10.1/APlayer.min.js"></script> <script> $(function(){ $.ajax({ url:"http://api.lanhuiw.cn/index/music/kugou/id/1005", //把这里的链接替换你的歌单解析api success:function(e){ var a=new APlayer({ element:document.getElementById("aplayer"), autoplay:true, fixed:true, loop:"all", order:"random", listFolded:true, showlrc:3, theme:"#FFC0CB", listmaxheight:"200px", music:eval(e)}); window.aplayers||(window.aplayers=[]), window.aplayers.push(a)}})}) </script>