From 6589094d9942e11514343ee09d9ccf105b27b5d4 Mon Sep 17 00:00:00 2001 From: binaryify Date: Sun, 29 May 2022 19:01:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=8C=BF=E5=90=8Dcookie?= =?UTF-8?q?=E7=94=9F=E6=88=90=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- module/register_anonimous.js | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 module/register_anonimous.js diff --git a/module/register_anonimous.js b/module/register_anonimous.js new file mode 100644 index 0000000..4d6f7f5 --- /dev/null +++ b/module/register_anonimous.js @@ -0,0 +1,34 @@ +// 邮箱登录 + +const crypto = require('crypto') + +module.exports = async (query, request) => { + query.cookie.os = 'iOS' + const data = { + username: + 'MzEwMjcwYmY0Y2Y0ODcwMzU0ZDFkZmIxMmMzMGYyMTkgVlBaanMwNmtrb1BYMGxOVzVUMUJ3Zz09', + } + let result = await request( + 'POST', + `https://music.163.com/api/register/anonimous`, + data, + { + crypto: 'weapi', + cookie: query.cookie, + proxy: query.proxy, + realIP: query.realIP, + }, + ) + + if (result.body.code === 200) { + result = { + status: 200, + body: { + ...result.body, + cookie: result.cookie.join(';'), + }, + cookie: result.cookie, + } + } + return result +}