feat: realIP option

This commit is contained in:
a632079
2020-08-05 02:07:37 +08:00
parent 31d7e3941e
commit 9bd30a0ffb
178 changed files with 1734 additions and 906 deletions

View File

@ -2,15 +2,18 @@
module.exports = (query, request) => {
const data = {
'e_r': true
};
Object.keys(query).forEach(i => {
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}
)
};
return request('POST', `http://music.163.com/eapi/batch`, data, {
crypto: 'eapi',
proxy: query.proxy,
url: '/api/batch',
cookie: query.cookie,
realIP: query.realIP,
})
}