style: auto format
This commit is contained in:
parent
982dd67815
commit
55e272bd26
|
|
@ -24,22 +24,22 @@ module.exports = {
|
|||
headers: {
|
||||
Referer: 'https://www.bilibili.com/',
|
||||
Cookie: cookie.join('; '),
|
||||
}
|
||||
},
|
||||
});
|
||||
cookie.push(['bvuid4', encodeURIComponent(response.data.data.b_4)].join('='));
|
||||
const e = Math.floor(Date.now() / 1000);;
|
||||
const e = Math.floor(Date.now() / 1000);
|
||||
const hexsign = utils.hexsign(e);
|
||||
await got('https://space.bilibili.com/1', {
|
||||
headers: {
|
||||
Referer: 'https://www.bilibili.com/',
|
||||
Cookie: cookie.join('; '),
|
||||
}
|
||||
},
|
||||
});
|
||||
response = await got.post(`https://api.bilibili.com/bapis/bilibili.api.ticket.v1.Ticket/GenWebTicket?key_id=ec02&hexsign=${hexsign}&context[ts]=${e}&csrf=`, {
|
||||
headers: {
|
||||
Referer: 'https://space.bilibili.com/1',
|
||||
Cookie: cookie.join('; '),
|
||||
}
|
||||
},
|
||||
});
|
||||
cookie.push(['bili_ticket', response.data.data.ticket].join('='));
|
||||
cookie.push(['bili_ticket_expires', (parseInt(response.data.data.created_at) + parseInt(response.data.data.ttl)).toString()].join('='));
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ function addVerifyInfo(params, verifyString) {
|
|||
const wts = Math.round(Date.now() / 1000);
|
||||
const w_rid = md5(`${verifyParam}&wts=${wts}${verifyString}`);
|
||||
return `${params}&w_rid=${w_rid}&wts=${wts}`;
|
||||
};
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
iframe,
|
||||
|
|
|
|||
Loading…
Reference in New Issue