mirror of
https://github.com/NeteaseCloudMusicApiEnhanced/api-enhanced.git
synced 2026-10-20 22:51:23 +08:00
v4.0,新增云盘上传接口以及二维码登录相关接口和相关demo,升级部分接口加密方法 #70 , #121 ,#121 , #153 ,#248 , #705 , #716 , #745 , #1055
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
const { cloud, login_cellphone } = require('../main')
|
||||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
|
||||
async function main() {
|
||||
const result = await login_cellphone({
|
||||
phone: '手机号',
|
||||
password: '密码',
|
||||
})
|
||||
const filePath = './test.mp3'
|
||||
try {
|
||||
await cloud({
|
||||
songFile: {
|
||||
name: path.basename(filePath),
|
||||
data: fs.readFileSync(filePath),
|
||||
},
|
||||
cookie: result.body.cookie,
|
||||
})
|
||||
} catch (error) {
|
||||
console.log(error, 'error')
|
||||
}
|
||||
}
|
||||
main()
|
||||
Reference in New Issue
Block a user