Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
AscendKing
NeteaseCloudMusicApi
提交
1f5cc795
N
NeteaseCloudMusicApi
项目概览
AscendKing
/
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,体验更适合开发者的 AI 搜索 >>
提交
1f5cc795
编写于
7月 16, 2017
作者:
Z
zhuangtongfa
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修复红心功能 #75
上级
50c80e77
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
16 addition
and
14 deletion
+16
-14
CHANGELOG.MD
CHANGELOG.MD
+3
-0
app.js
app.js
+1
-1
package.json
package.json
+1
-1
router/like.js
router/like.js
+10
-11
util/util.js
util/util.js
+1
-1
未找到文件。
CHANGELOG.MD
浏览文件 @
1f5cc795
# 更新日志
### 2.6.1 | 2017.7.16
修复红心接口
### 2.6.0 | 2017.6.25
修复签到接口
...
...
app.js
浏览文件 @
1f5cc795
...
...
@@ -221,7 +221,7 @@ app.use('/user/audio', require('./router/user_audio'))
//云盘数据
app
.
use
(
"
/user/cloud
"
,
require
(
"
./router/user_cloud
"
))
//云盘数据详情?
??
不要使用
//云盘数据详情?
暂时
不要使用
app
.
use
(
"
/user/cloud/search
"
,
require
(
"
./router/user_cloud_search
"
))
//用户动态
app
.
use
(
"
/user/event
"
,
require
(
"
./router/user_event
"
))
...
...
package.json
浏览文件 @
1f5cc795
{
"name"
:
"NeteaseCloudMusicApi"
,
"version"
:
"2.6.
0
"
,
"version"
:
"2.6.
1
"
,
"description"
:
"网易云音乐 NodeJS 版 API"
,
"scripts"
:
{
"start"
:
"node app.js"
,
...
...
router/like.js
浏览文件 @
1f5cc795
const
express
=
require
(
"
express
"
)
const
express
=
require
(
'
express
'
)
const
router
=
express
()
const
{
createWebAPIRequest
}
=
require
(
"
../util/util
"
)
const
{
createWebAPIRequest
}
=
require
(
'
../util/util
'
)
router
.
get
(
"
/
"
,
(
req
,
res
)
=>
{
router
.
get
(
'
/
'
,
(
req
,
res
)
=>
{
const
cookie
=
req
.
get
(
'
Cookie
'
)
?
req
.
get
(
'
Cookie
'
)
:
''
const
data
=
{
"
csrf_token
"
:
""
}
const
trackId
=
req
.
query
.
id
const
like
=
req
.
query
.
like
||
true
const
alg
=
req
.
query
.
alg
||
"
itembased
"
const
alg
=
req
.
query
.
alg
||
'
itembased
'
const
time
=
req
.
query
.
time
||
25
console
.
log
(
alg
)
const
data
=
{
csrf_token
:
''
,
trackId
,
like
}
createWebAPIRequest
(
'
music.163.com
'
,
`/weapi/radio/like?alg=
${
alg
}
&trackId=
${
trackId
}
&like=
${
like
}
&time=
${
time
}
`
,
...
...
@@ -23,6 +24,4 @@ router.get("/", (req, res) => {
)
})
module
.
exports
=
router
\ No newline at end of file
module
.
exports
=
router
util/util.js
浏览文件 @
1f5cc795
...
...
@@ -56,7 +56,7 @@ function createRequest(path, method, data, callback, errorcallback) {
path
:
path
,
headers
:
{
'
Referer
'
:
'
http://music.163.com
'
,
'
Cookie
'
:
'
appver=
2.0
.2
'
,
'
Cookie
'
:
'
appver=
1.5
.2
'
,
'
Content-Type
'
:
'
application/x-www-form-urlencoded
'
,
},
},
res
=>
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录