新增eapi算法

This commit is contained in:
lizhenyuls
2019-05-16 23:01:27 +08:00
parent 4163cbbe3d
commit 99e60a5fc4
3 changed files with 99 additions and 8 deletions

14
module/batch.js Normal file
View File

@ -0,0 +1,14 @@
module.exports = (query, request) => {
const data = {
"e_r": true
};
Object.keys(query).forEach(i => {
if (/^\/api\//.test(i)) {
data[i] = query[i]
}
})
return request(
'POST', `http://music.163.com/eapi/batch`, data,
{crypto: 'eapi', proxy: query.proxy, url: '/api/batch', cookie: query.cookie}
)
};