From 2d8189a2501f1cd0ea1823079b9f8532155a243b Mon Sep 17 00:00:00 2001 From: Alice Gaudon Date: Fri, 11 Dec 2020 19:45:11 +0100 Subject: [PATCH] twist-dl.sh: update parser, fix access token matching --- twist-dl.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/twist-dl.sh b/twist-dl.sh index d275c42..76c759f 100755 --- a/twist-dl.sh +++ b/twist-dl.sh @@ -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",