Skip to content

Commit

Permalink
fix: send getStatus with cookie
Browse files Browse the repository at this point in the history
  • Loading branch information
lekoOwO committed Dec 18, 2022
1 parent 65bca28 commit 94f93f7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dataModule/netease2.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ function randomUserAgent() {
const userAgent = randomUserAgent();

const options = (url, qs = {}, resolveWithFullResponse = false) => {
if (!url.match(/login/)) {
if (!url.match(/login/) || url.match(/login\/status/)) {
url = `${url}${url.includes("?") ? "&" : "?"}realIP=${chinaIP}`
+ `${config.proxy ? "&proxy=" + encodeURIComponent(config.proxy) : ""}`
+ `${cookie ? "&cookie=" + encodeURIComponent(cookie) : ""}`
Expand Down Expand Up @@ -137,7 +137,7 @@ const normalOptions = async (url, req = {}) => {

const imageUrl = x => `/pokaapi/req/?moduleName=Netease2&data=${encodeURIComponent(genReq(x))}`;

async function qrLogin() {
function qrLogin() {
return new Promise(async (resolve, reject) => {
let qrKey = await client(options(`/login/qr/key?t=${Date.now()}`))
let createQr = await client(options(`/login/qr/create?key=${qrKey.data.unikey}`))
Expand Down

0 comments on commit 94f93f7

Please sign in to comment.