twist-dl.sh: update parser, fix access token matching
This commit is contained in:
parent
96a2d1b8cf
commit
2d8189a250
@ -84,7 +84,7 @@ function getAccessToken(cookie, then) {
|
|||||||
https.request(scriptUrl, {
|
https.request(scriptUrl, {
|
||||||
}, response => {
|
}, response => {
|
||||||
handleResponse(response, data => {
|
handleResponse(response, data => {
|
||||||
const accessToken = data.match(/"token=([^"]+?)"/)[1];
|
const accessToken = data.match(/\{"x-access-token":"([^"]+?)"\}/)[1];
|
||||||
const password = data.match(/name: ?".+",.+?k: ?"([^"]+?)",/)[1];
|
const password = data.match(/name: ?".+",.+?k: ?"([^"]+?)",/)[1];
|
||||||
console.log('Access token:', accessToken);
|
console.log('Access token:', accessToken);
|
||||||
//k: "LXgIVP&PorO68Rq7dTx8N^lP!Fa5sGJ^*XK",
|
//k: "LXgIVP&PorO68Rq7dTx8N^lP!Fa5sGJ^*XK",
|
||||||
|
Loading…
Reference in New Issue
Block a user