forked from Binaryify/NeteaseCloudMusicApi
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
94 changed files
with
851 additions
and
1,348 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,19 @@ | ||
const express = require('express') | ||
const router = express() | ||
const { createWebAPIRequest } = require('../util/util') | ||
|
||
router.get('/', (req, res) => { | ||
const cookie = req.get('Cookie') ? req.get('Cookie') : '' | ||
// 获取专辑内容 | ||
module.exports = (req, res, createWebAPIRequest, request) => { | ||
const cookie = req.get("Cookie") ? req.get("Cookie") : ""; | ||
const data = { | ||
csrf_token: '' | ||
} | ||
const id = req.query.id | ||
csrf_token: "" | ||
}; | ||
const id = req.query.id; | ||
createWebAPIRequest( | ||
'music.163.com', | ||
"music.163.com", | ||
`/weapi/v1/album/${id}`, | ||
'POST', | ||
"POST", | ||
data, | ||
cookie, | ||
music_req => { | ||
res.send(music_req) | ||
res.send(music_req); | ||
}, | ||
err => res.status(502).send('fetch error') | ||
) | ||
}) | ||
|
||
module.exports = router | ||
err => res.status(502).send("fetch error") | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,20 @@ | ||
const express = require('express') | ||
const router = express() | ||
const { createWebAPIRequest } = require('../util/util') | ||
|
||
router.get('/', (req, res) => { | ||
const cookie = req.get('Cookie') ? req.get('Cookie') : '' | ||
const id = req.query.id | ||
// 获取歌手专辑列表 | ||
module.exports = (req, res, createWebAPIRequest, request) => { | ||
const cookie = req.get("Cookie") ? req.get("Cookie") : ""; | ||
const id = req.query.id; | ||
const data = { | ||
offset: req.query.offset || 0, | ||
total: true, | ||
limit: req.query.limit || 30, | ||
csrf_token: '' | ||
} | ||
csrf_token: "" | ||
}; | ||
createWebAPIRequest( | ||
'music.163.com', | ||
"music.163.com", | ||
`/weapi/artist/albums/${id}`, | ||
'POST', | ||
"POST", | ||
data, | ||
cookie, | ||
music_req => res.send(music_req), | ||
err => res.status(502).send('fetch error') | ||
) | ||
}) | ||
|
||
module.exports = router | ||
err => res.status(502).send("fetch error") | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,17 @@ | ||
const express = require('express') | ||
const router = express() | ||
const { createWebAPIRequest } = require('../util/util') | ||
|
||
router.get('/', (req, res) => { | ||
const cookie = req.get('Cookie') ? req.get('Cookie') : '' | ||
const id = req.query.id | ||
module.exports = (req, res, createWebAPIRequest, request) => { | ||
const cookie = req.get("Cookie") ? req.get("Cookie") : ""; | ||
const id = req.query.id; | ||
const data = { | ||
id, | ||
csrf_token: '' | ||
} | ||
csrf_token: "" | ||
}; | ||
createWebAPIRequest( | ||
'music.163.com', | ||
"music.163.com", | ||
`/weapi/artist/introduction`, | ||
'POST', | ||
"POST", | ||
data, | ||
cookie, | ||
music_req => res.send(music_req), | ||
err => res.status(502).send('fetch error') | ||
) | ||
}) | ||
|
||
module.exports = router | ||
err => res.status(502).send("fetch error") | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,20 @@ | ||
const express = require('express') | ||
const router = express() | ||
const { createWebAPIRequest } = require('../util/util') | ||
|
||
router.get('/', (req, res) => { | ||
const cookie = req.get('Cookie') ? req.get('Cookie') : '' | ||
const id = req.query.id | ||
module.exports = (req, res, createWebAPIRequest, request) => { | ||
const cookie = req.get("Cookie") ? req.get("Cookie") : ""; | ||
const id = req.query.id; | ||
const data = { | ||
artistId: id, | ||
total: true, | ||
offset: req.query.offset, | ||
limit: req.query.limit, | ||
csrf_token: '' | ||
} | ||
csrf_token: "" | ||
}; | ||
createWebAPIRequest( | ||
'music.163.com', | ||
"music.163.com", | ||
`/weapi/artist/mvs`, | ||
'POST', | ||
"POST", | ||
data, | ||
cookie, | ||
music_req => res.send(music_req), | ||
err => res.status(502).send('fetch error') | ||
) | ||
}) | ||
|
||
module.exports = router | ||
err => res.status(502).send("fetch error") | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,27 @@ | ||
const express = require('express') | ||
const router = express() | ||
const request = require('request') | ||
const { createWebAPIRequest } = require('../util/util') | ||
router.get('/', (req, res) => { | ||
const id = parseInt(req.query.id) | ||
const br = parseInt(req.query.br || 999000) | ||
module.exports = (req, res, createWebAPIRequest, request) => { | ||
const id = parseInt(req.query.id); | ||
const br = parseInt(req.query.br || 999000); | ||
const data = { | ||
ids: [id], | ||
br: br, | ||
csrf_token: '' | ||
} | ||
const cookie = req.get('Cookie') ? req.get('Cookie') : '' | ||
csrf_token: "" | ||
}; | ||
const cookie = req.get("Cookie") ? req.get("Cookie") : ""; | ||
|
||
createWebAPIRequest( | ||
'music.163.com', | ||
'/weapi/song/enhance/player/url', | ||
'POST', | ||
"music.163.com", | ||
"/weapi/song/enhance/player/url", | ||
"POST", | ||
data, | ||
cookie, | ||
music_req => { | ||
if (JSON.parse(music_req).code == 200) { | ||
return res.send({ success: true, message: 'ok' }) | ||
return res.send({ success: true, message: "ok" }); | ||
} | ||
return res.send({ success: false, message: '亲爱的,暂无版权' }) | ||
return res.send({ success: false, message: "亲爱的,暂无版权" }); | ||
}, | ||
err => { | ||
res.status(502).send('fetch error') | ||
res.status(502).send("fetch error"); | ||
} | ||
) | ||
}) | ||
|
||
module.exports = router | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,21 @@ | ||
const express = require('express') | ||
const router = express() | ||
const { createWebAPIRequest } = require('../util/util') | ||
|
||
router.get('/', (req, res) => { | ||
const rid = req.query.id | ||
const cookie = req.get('Cookie') ? req.get('Cookie') : '' | ||
module.exports = (req, res, createWebAPIRequest, request) => { | ||
const rid = req.query.id; | ||
const cookie = req.get("Cookie") ? req.get("Cookie") : ""; | ||
const data = { | ||
offset: req.query.offset || 0, | ||
rid: rid, | ||
limit: req.query.limit || 20, | ||
csrf_token: '' | ||
} | ||
csrf_token: "" | ||
}; | ||
createWebAPIRequest( | ||
'music.163.com', | ||
"music.163.com", | ||
`/weapi/v1/resource/comments/R_AL_3_${rid}/?csrf_token=`, | ||
'POST', | ||
"POST", | ||
data, | ||
cookie, | ||
music_req => { | ||
res.send(music_req) | ||
res.send(music_req); | ||
}, | ||
err => res.status(502).send('fetch error') | ||
) | ||
}) | ||
|
||
module.exports = router | ||
err => res.status(502).send("fetch error") | ||
); | ||
}; |
Oops, something went wrong.