paster442

Follow bot for Scratch in Python

Aug 19th, 2021 (edited)
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.69 KB | None | 0 0
  1. from scratchclient import ScratchSession as login
  2. from random import shuffle
  3. from requests import get
  4. from time import sleep
  5.  
  6. session = login("username", "password") # replace this with your Scratch account username and password
  7.  
  8. print("Logged in")
  9.  
  10. a = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  11. users = list()
  12.  
  13. for l1 in a:
  14.     for l2 in a:
  15.         for l3 in a:
  16.             users.append(l1+l2+l3)
  17.            
  18. shuffle(users)
  19. users.remove("FOC")
  20.  
  21. print("Generated usernames (" + str(len(users)) + ")\n")
  22.  
  23. i = 1
  24.  
  25. for user in users:
  26.     try:
  27.         session.get_user(user).follow()
  28.         print(str(i) + ") Followed @" + get(f"https://api.scratch.mit.edu/users/{user}/").json()["username"])
  29.         i += 1
  30.     except:
  31.         pass
  32.    
  33.     sleep(8.0)
Add Comment
Please, Sign In to add comment