music-get
v0.0.4
Published
一个Nodejs的音乐下载三方件,可以从不同的音乐源下载歌曲,目前只支持qq, xiami。
Downloads
7
Readme
music-get
一个Nodejs的音乐下载三方件,可以从不同的音乐源下载歌曲,目前只支持qq, xiami。
安装:
npm i music-get
使用:
const musicGet = require('music-get');
musicGet({keywords: '吻别'}).then(res => {
// res = [
// {datas, currentPage, currentNum, totalNum, from}
// ]
// datas = [{
// songId, 歌曲id
// url, 歌曲的下载URL
// songName, 歌曲名称
// albumName, 专辑名称
// singer, 歌手
// from: 'qq', 来源
// }]
console.log(res);
});
参数:
- keywords: 搜索关键字 必填项 字符串类型
- limit: 每次返回的结果数量 非必填项 默认为5 数字类型
- page: 当前页数 非必填项 默认为1 数字类型
- src: 来源 非必填项 默认为['qq'] 数组类型 当前只支持['qq', 'xiami']