This commit is contained in:
binaryify
2021-02-27 19:58:24 +08:00
parent d1907ae541
commit 44bb25e81c
9 changed files with 76 additions and 22 deletions

View File

@ -5,7 +5,7 @@ module.exports = (query, request) => {
ctcode: query.ctcode || '86',
cellphone: query.phone,
}
return request('POST', `https://music.163.com/weapi/sms/captcha/sent`, data, {
return request('POST', `https://music.163.com/api/sms/captcha/sent`, data, {
crypto: 'weapi',
cookie: query.cookie,
proxy: query.proxy,

View File

@ -8,6 +8,7 @@ module.exports = (query, request) => {
phone: query.phone,
password: crypto.createHash('md5').update(query.password).digest('hex'),
nickname: query.nickname,
countrycode: query.countrycode || '86',
}
return request('POST', `https://music.163.com/api/register/cellphone`, data, {
crypto: 'weapi',

View File

@ -3,8 +3,7 @@
module.exports = (query, request) => {
query.ids = query.ids.split(/\s*,\s*/)
const data = {
c: '[' + query.ids.map((id) => '{"id":' + id + '}').join(',') + ']',
ids: '[' + query.ids.join(',') + ']',
c: '[' + query.ids.map((id) => '{"id":' + id + '}').join(',') + ']'
}
return request('POST', `https://music.163.com/weapi/v3/song/detail`, data, {
crypto: 'weapi',

View File

@ -0,0 +1,21 @@
module.exports = (query, request) => {
const data = {
phone: query.phone,
countrycode: query.countrycode || '86',
captcha: query.captcha,
password: query.password
? crypto.createHash('md5').update(query.password).digest('hex')
: '',
}
return request(
'POST',
`https://music.163.com/api/user/bindingCellphone`,
data,
{
crypto: 'weapi',
cookie: query.cookie,
proxy: query.proxy,
realIP: query.realIP,
},
)
}

View File

@ -3,8 +3,10 @@
module.exports = (query, request) => {
const data = {
userId: query.uid,
time: query.lasttime || -1,
time: '0',
limit: query.limit || 30,
offset: query.offset || 0,
getcounts: 'true',
}
return request(
'POST',