From 4da0fc0f5958afbe86c11db0877ed581247b2188 Mon Sep 17 00:00:00 2001 From: onezDerv Date: Mon, 30 Sep 2024 05:31:55 -0400 Subject: [PATCH] why wont this stil work --- unfollow_all.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/unfollow_all.js b/unfollow_all.js index b76e7f1..7893aa3 100644 --- a/unfollow_all.js +++ b/unfollow_all.js @@ -24,11 +24,17 @@ async function unfollowUser(user) { the = the.username; e = await fetch(`https://scratch.mit.edu/site-api/users/followers/${the}/remove/?usernames=${user}`, { "method": "PUT", + "body": "{}", "headers": { "x-csrftoken": getCookie('scratchcsrftoken') } }); - e = await e.json(); + e = await e.text(); + try { + e = JSON.parse(e); + } catch (err) { + e = {}; + } console.log(e); if (e.success) { gek++;