Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
NeteaseCloudMusicApi
Advanced tools
网易云音乐 Node.js API service
需要 NodeJS 14+ 环境
$ git clone git@gitlab.com:Binaryify/NeteaseCloudMusicApi.git
$ cd NeteaseCloudMusicApi
$ npm install
或者
$ git clone https://gitlab.com/Binaryify/NeteaseCloudMusicApi.git
$ cd NeteaseCloudMusicApi
$ npm install
调用前务必阅读文档的调用前须知
$ node app.js
服务器启动默认端口为 3000,若不想使用 3000 端口,可使用以下命令: Mac/Linux
$ PORT=4000 node app.js
windows 下使用 git-bash 或者 cmder 等终端执行以下命令:
$ set PORT=4000 && node app.js
可在终端直接执行
npx NeteaseCloudMusicApi@latest
使用此命令,可直接启动服务,无需下载或者 clone 项目
v4.0.8 加入了 Vercel 配置文件,可以直接在 Vercel 下部署了,不需要自己的服务器
New Project
Import Git Repository
并选择你 fork 的此项目并点击import
PERSONAL ACCOUNT
的 select
Continue
PROJECT NAME
自己填,FRAMEWORK PRESET
选 Other
然后直接点 Deploy
接着等部署完成即可因 Vercel
在国内访问太慢,在此提供腾讯云 serverless 部署方法(注意:腾讯云 serverless 并不是免费的,前三个月有免费额度,之后收费)
新建应用
创建方式
选择 Web 应用
Express框架
,点击底部下一步按钮
应用名
,上传方式选择代码仓库
,进行 GitHub 授权(如已授权可跳过这一步),代码仓库选择刚刚 fork 的项目#!/bin/bash
export PORT=9000
/var/lang/node16/bin/node app.js
完成
,等待部署完成,点击资源列表
的 API网关
里的 URL
,正常情况会打开文档地址,点击文档例子
可查看接口调用效果v3.31.0 后支持 Node.js 调用,导入的方法为module
内的文件名,返回内容包含status
和body
,status
为状态码,body
为请求返回内容,参考module_example
文件夹下的 test.js
const { login_cellphone, user_cloud } = require('NeteaseCloudMusicApi')
async function main() {
try {
const result = await login_cellphone({
phone: '手机号',
password: '密码',
})
console.log(result)
const result2 = await user_cloud({
cookie: result.body.cookie, // 凭证
})
console.log(result2.body)
} catch (error) {
console.log(error)
}
}
main()
// test.ts
import { banner } from 'NeteaseCloudMusicApi'
banner({ type: 0 }).then((res) => {
console.log(res)
})
$ npm test
语言 | 作者 | 地址 | 类型 |
---|---|---|---|
Java | JackuXL | https://github.com/JackuXL/NeteaseCloudMusicApi-SDK | 第三方 |
Java | 1015770492 | https://github.com/1015770492/yumbo-music-utils | 第三方 |
Python | 盧瞳 | NeteaseCloudMusic_PythonSDK | 第三方 |
FAQs
网易云音乐 NodeJS 版 API
The npm package NeteaseCloudMusicApi receives a total of 624 weekly downloads. As such, NeteaseCloudMusicApi popularity was classified as not popular.
We found that NeteaseCloudMusicApi demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.