twist-dl.sh: update parser, fix access token matching

This commit is contained in:
Alice Gaudon 2020-12-11 19:45:11 +01:00
parent 96a2d1b8cf
commit 2d8189a250
1 changed files with 1 additions and 1 deletions

View File

@ -84,7 +84,7 @@ function getAccessToken(cookie, then) {
https.request(scriptUrl, {
}, response => {
handleResponse(response, data => {
const accessToken = data.match(/"token=([^"]+?)"/)[1];
const accessToken = data.match(/\{"x-access-token":"([^"]+?)"\}/)[1];
const password = data.match(/name: ?".+",.+?k: ?"([^"]+?)",/)[1];
console.log('Access token:', accessToken);
//k: "LXgIVP&PorO68Rq7dTx8N^lP!Fa5sGJ^*XK",