Created
November 1, 2024 13:22
-
-
Save TheMemeSniper/661beb2ccd217f87c2afa13b753576ed to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import requests | |
from time import sleep | |
instance = "https://johnlenn.on" | |
token = "ImTimTokeneeneyImTheFounderOfEpicAuthentication" # get this by ripping any request from your browser devtools | |
hdrs = {"Content-Type": "application/json"} | |
followerjson = open("./followers.json", "r") # get this by requesting INSTANCE/api/users/followers with the max limit and then copying the raw json response into ./followers.json | |
followers = json.load(followerjson) | |
followersid = [] | |
i = 0 | |
for key in followers: | |
followersid.append(followers[i]["follower"]["id"]) | |
i = i + 1 | |
for i in followersid: | |
print("unfollowing id "+ i) | |
constructor = {"userId":i,"i":token} | |
print(constructor) | |
response = requests.post(f"{instance}/api/following/invalidate", json=constructor, headers=hdrs) | |
print(response.text) | |
sleep(5) # increase to avoid ratelimits as needed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment