Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
鱼九·
NeteaseCloudMusicApi
提交
679be3df
N
NeteaseCloudMusicApi
项目概览
鱼九·
/
NeteaseCloudMusicApi
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
N
NeteaseCloudMusicApi
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
679be3df
编写于
5月 01, 2021
作者:
B
binaryify
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
首页-发现接口增加 cursor 参数,refresh默认设为false #1217
上级
e35a44e9
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
123 addition
and
12 deletion
+123
-12
CHANGELOG.MD
CHANGELOG.MD
+5
-0
docs/README.md
docs/README.md
+6
-8
interface.d.ts
interface.d.ts
+4
-1
module/homepage_block_page.js
module/homepage_block_page.js
+1
-1
module/song_detail.js
module/song_detail.js
+1
-1
package.json
package.json
+1
-1
public/home.html
public/home.html
+58
-0
public/login.html
public/login.html
+47
-0
未找到文件。
CHANGELOG.MD
浏览文件 @
679be3df
# 更新日志
### 4.0.12 | 2021.5.1
-
首页-发现接口增加 cursor 参数,refresh默认设为false
[
#1217
](
https://github.com/Binaryify/NeteaseCloudMusicApi/issues/1217
)
-
更新
`song/detail`
接口
### 4.0.11 | 2021.4.26
-
新增云盘歌曲信息匹配纠正接口
[
#1212
](
https://github.com/Binaryify/NeteaseCloudMusicApi/issues/1212
)
...
...
docs/README.md
浏览文件 @
679be3df
...
...
@@ -260,7 +260,7 @@ $ set HOST=127.0.0.1 && node app.js
```
## Vercel 部署
v4.0.8 加入了 Vercel 配置文件,可以直接在 Vercel 下部署了,不需要自己的服务器
v4.0.8 加入了 Vercel 配置文件,可以直接在 Vercel 下部署了,不需要自己的服务器
(访问Vercel部署的接口,需要额外加一个realIP参数,如
`/song/url?id=191254&realIP=116.25.146.177`
)
### 操作方法
1.
fork 此项目
2.
在 Vercel 官网点击
`New Project`
...
...
@@ -1502,7 +1502,9 @@ mp3url 不能直接用 , 可通过 `/song/url` 接口传入歌曲 id 获取具
**接口地址 :**
`/homepage/block/page`
**可选参数 :**
`refresh`
: 是否刷新数据,默认为true
**可选参数 :**
`refresh`
: 是否刷新数据,默认为false
`cursor`
: 上一条数据返回的cursor
### 首页-发现-圆形图标入口列表
...
...
@@ -1934,7 +1936,7 @@ mp3url 不能直接用 , 可通过 `/song/url` 接口传入歌曲 id 获取具
### 获取歌曲详情
说明 : 调用此接口 , 传入音乐 id(支持多个 id, 用
`,`
隔开), 可获得歌曲详情
(注意:歌曲封面现在需要通过专辑内容接口获取)
说明 : 调用此接口 , 传入音乐 id(支持多个 id, 用
`,`
隔开), 可获得歌曲详情
**必选参数 :**
`ids`
: 音乐 id, 如
`ids=347230`
...
...
@@ -1942,8 +1944,7 @@ mp3url 不能直接用 , 可通过 `/song/url` 接口传入歌曲 id 获取具
**调用例子 :**
`/song/detail?ids=347230`
,
`/song/detail?ids=347230,347231`
返回数据如下图 :
![
获取歌曲详情
](
https://raw.githubusercontent.com/Binaryify/NeteaseCloudMusicApi/master/static/songDetail.png
)
### 获取专辑内容
...
...
@@ -1955,9 +1956,6 @@ mp3url 不能直接用 , 可通过 `/song/url` 接口传入歌曲 id 获取具
**调用例子 :**
`/album?id=32311`
返回数据如下图 :
![
获取专辑内容
](
https://raw.githubusercontent.com/Binaryify/NeteaseCloudMusicApi/master/static/%E4%B8%93%E8%BE%91.png
)
### 专辑动态信息
说明 : 调用此接口 , 传入专辑 id, 可获得专辑动态信息,如是否收藏,收藏数,评论数,分享数
...
...
interface.d.ts
浏览文件 @
679be3df
...
...
@@ -643,7 +643,10 @@ export function history_recommend_songs_detail(
):
Promise
<
Response
>
export
function
homepage_block_page
(
params
:
{
refresh
?:
'
true
'
|
'
false
'
|
boolean
}
&
RequestBaseConfig
,
params
:
{
refresh
?:
'
true
'
|
'
false
'
|
boolean
cursor
?:
string
}
&
RequestBaseConfig
,
):
Promise
<
Response
>
export
function
homepage_dragon_ball
(
...
...
module/homepage_block_page.js
浏览文件 @
679be3df
...
...
@@ -4,7 +4,7 @@
module
.
exports
=
(
query
,
request
)
=>
{
query
.
cookie
.
os
=
'
ios
'
query
.
cookie
.
appver
=
'
8.1.20
'
const
data
=
{
refresh
:
query
.
refresh
||
true
}
const
data
=
{
refresh
:
query
.
refresh
||
false
,
cursor
:
query
.
cursor
}
return
request
(
'
POST
'
,
`https://music.163.com/api/homepage/block/page`
,
...
...
module/song_detail.js
浏览文件 @
679be3df
...
...
@@ -5,7 +5,7 @@ module.exports = (query, request) => {
const
data
=
{
c
:
'
[
'
+
query
.
ids
.
map
((
id
)
=>
'
{"id":
'
+
id
+
'
}
'
).
join
(
'
,
'
)
+
'
]
'
,
}
return
request
(
'
POST
'
,
`https://music.163.com/
we
api/v3/song/detail`
,
data
,
{
return
request
(
'
POST
'
,
`https://music.163.com/api/v3/song/detail`
,
data
,
{
crypto
:
'
weapi
'
,
cookie
:
query
.
cookie
,
proxy
:
query
.
proxy
,
...
...
package.json
浏览文件 @
679be3df
{
"name"
:
"NeteaseCloudMusicApi"
,
"version"
:
"4.0.1
1
"
,
"version"
:
"4.0.1
2
"
,
"description"
:
"网易云音乐 NodeJS 版 API"
,
"scripts"
:
{
"start"
:
"node app.js"
,
...
...
public/home.html
0 → 100644
浏览文件 @
679be3df
<!DOCTYPE html>
<html
lang=
"zh"
>
<head>
<meta
charset=
"UTF-8"
/>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
/>
<title>
home
</title>
</head>
<body>
<script
src=
"https://cdn.bootcdn.net/ajax/libs/axios/0.20.0-0/axios.min.js"
></script>
<script>
const
phone
=
''
// 这里填手机号
const
password
=
''
// 这里填密码
const
fileUpdateTime
=
{}
let
cookieToken
=
''
if
(
!
phone
||
!
password
)
{
const
msg
=
'
请设置你的手机号码和密码
'
alert
(
msg
)
throw
new
Error
(
msg
)
}
async
function
login
()
{
const
res
=
await
axios
({
url
:
`/login/cellphone?phone=
${
phone
}
&password=
${
encodeURIComponent
(
password
,
)}
`
,
})
cookieToken
=
res
.
data
.
cookie
}
async
function
main
()
{
await
login
()
const
res
=
await
axios
({
url
:
`/homepage/block/page`
,
data
:
{
cookie
:
cookieToken
,
},
method
:
'
post
'
,
})
let
cursor
=
''
console
.
log
(
res
.
data
.
data
)
if
(
res
.
data
.
data
.
hasMore
)
{
cursor
=
res
.
data
.
data
.
cursor
const
res2
=
await
axios
({
url
:
`/homepage/block/page?time=
${
Date
.
now
()}
`
,
data
:
{
cookie
:
cookieToken
,
cursor
:
cursor
,
},
method
:
'
post
'
,
})
}
}
main
()
</script>
</body>
</html>
public/login.html
0 → 100644
浏览文件 @
679be3df
<!DOCTYPE html>
<html
lang=
"zh"
>
<head>
<meta
charset=
"UTF-8"
/>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
/>
<title>
登录
</title>
</head>
<body>
<script
src=
"https://cdn.bootcdn.net/ajax/libs/axios/0.20.0-0/axios.min.js"
></script>
<script>
const
phone
=
''
// 这里填手机号
const
password
=
''
// 这里填密码
const
fileUpdateTime
=
{}
if
(
!
phone
||
!
password
)
{
const
msg
=
'
请设置你的手机号码和密码
'
alert
(
msg
)
throw
new
Error
(
msg
)
}
async
function
login
()
{
const
res
=
await
axios
({
url
:
`/login/cellphone`
,
method
:
'
post
'
,
data
:
{
phone
:
phone
,
password
:
password
,
},
})
return
res
.
data
.
cookie
}
async
function
main
()
{
const
cookieToken
=
await
login
()
const
res
=
await
axios
({
url
:
`/login/status`
,
method
:
'
post
'
,
data
:
{
cookie
:
cookieToken
,
},
})
}
main
()
</script>
</body>
</html>
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录