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
1 changed file
with
37 additions
and
37 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,37 @@ | ||
// 私人 DJ | ||
|
||
// 实际请求参数如下, 部分内容省略, 敏感信息已进行混淆 | ||
// 可按需修改此 API 的代码 | ||
/* {"extInfo":"{\"lastRequestTimestamp\":1692358373509,\"lbsInfoList\":[{\"lat\":40.23076381,\"lon\":129.07545186,\"time\":1692358543},{\"lat\":40.23076381,\"lon\":129.07545186,\"time\":1692055283}],\"listenedTs\":false,\"noAidjToAidj\":true}","header":"{}","e_r":true} */ | ||
|
||
module.exports = (query, request) => { | ||
var extInfo = {} | ||
if (query.latitude != undefined){ | ||
extInfo.lbsInfoList = [ | ||
{ | ||
lat: query.latitude, | ||
lon: query.longitude, | ||
time: Date.parse(new Date())/1000 | ||
} | ||
] | ||
} | ||
extInfo.noAidjToAidj = false; | ||
extInfo.lastRequestTimestamp = new Date().getTime() | ||
extInfo.listenedTs = false | ||
const data = { | ||
extInfo: JSON.stringify(extInfo) | ||
} | ||
console.log(data) | ||
return request( | ||
'POST', | ||
`https://interface3.music.163.com/eapi/aidj/content/rcmd/info`, | ||
data, | ||
{ | ||
crypto: 'eapi', | ||
cookie: query.cookie, | ||
proxy: query.proxy, | ||
realIP: query.realIP, | ||
url: '/api/aidj/content/rcmd/info', | ||
}, | ||
) | ||
} | ||
// 私人 DJ | ||
|
||
// 实际请求参数如下, 部分内容省略, 敏感信息已进行混淆 | ||
// 可按需修改此 API 的代码 | ||
/* {"extInfo":"{\"lastRequestTimestamp\":1692358373509,\"lbsInfoList\":[{\"lat\":40.23076381,\"lon\":129.07545186,\"time\":1692358543},{\"lat\":40.23076381,\"lon\":129.07545186,\"time\":1692055283}],\"listenedTs\":false,\"noAidjToAidj\":true}","header":"{}","e_r":true} */ | ||
|
||
module.exports = (query, request) => { | ||
var extInfo = {} | ||
if (query.latitude != undefined) { | ||
extInfo.lbsInfoList = [ | ||
{ | ||
lat: query.latitude, | ||
lon: query.longitude, | ||
time: Date.parse(new Date()) / 1000, | ||
}, | ||
] | ||
} | ||
extInfo.noAidjToAidj = false | ||
extInfo.lastRequestTimestamp = new Date().getTime() | ||
extInfo.listenedTs = false | ||
const data = { | ||
extInfo: JSON.stringify(extInfo), | ||
} | ||
console.log(data) | ||
return request( | ||
'POST', | ||
`https://interface3.music.163.com/eapi/aidj/content/rcmd/info`, | ||
data, | ||
{ | ||
crypto: 'eapi', | ||
cookie: query.cookie, | ||
proxy: query.proxy, | ||
realIP: query.realIP, | ||
url: '/api/aidj/content/rcmd/info', | ||
}, | ||
) | ||
} |