花生鼠的日常建站日志-------使用在线网易云音乐api

在自己的服务器上安装api服务器运行起来,然后通过api获取网易云音乐的资源。

 

步骤: 

首先下载网易云音乐的api服务器源码

github地址:https://github.com/Binaryify/NeteaseCloudMusicApi

zip文件直链下载:https://codeload.github.com/Binaryify/NeteaseCloudMusicApi/zip/master

使用方法:

第一步、上传  NeteaseCloudMusicApi-master.zip  压缩包到服务器上 

第二步、解压缩文件

    安装解压缩软件:

    sudo apt-get install unzip

解压缩:

unzip NeteaseCloudMusicApi-master.zip

网易云音乐的官方文档:

https://binaryify.github.io/NeteaseCloudMusicApi/#/  

根据官方文档执行

npm install

和 node app.js 

注意:

一、(注意路径,要在NeteaseCloudMusicApi-master文件夹内执行!)

二、(注意提前搭建好nodejs环境


nodejs的安装方法

Ubuntu:

切换到root:su root

更新源:

    安装curl命令:apt install curl

    进行更新源:curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -

安装命令:sudo apt install nodejs

查看版本命令:node -v

Centos:

切换到root用户执行:su root

然后更新源:curl --silent --location https://rpm.nodesource.com/setup_8.x | bash -

安装命令:sudo yum install -y nodejs

查看版本命令:node -v

 

网易云音乐api使用方法:

根据下面的示例自己看文档

示例:

比如官方文档的   搜索  示例

花生鼠的日常建站日志-------使用在线网易云音乐api

则链接为:http://localhost:3000/search?keywords=海阔天空

比如在我的服务器上的示例:http://www.huashengshu.top:3000/search?keywords=海阔天空 的结果

花生鼠的日常建站日志-------使用在线网易云音乐api