Skip to content

Instantly share code, notes, and snippets.

@TheMemeSniper
Created November 1, 2024 13:22
Show Gist options
  • Save TheMemeSniper/661beb2ccd217f87c2afa13b753576ed to your computer and use it in GitHub Desktop.
Save TheMemeSniper/661beb2ccd217f87c2afa13b753576ed to your computer and use it in GitHub Desktop.
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