Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # python
- from scratchclient import ScratchSession # scratchclient by https://scratch.mit.edu/users/Raihan142857
- import requests
- import random as ra
- import time as t
- session = ScratchSession("-Rix-", "goodpassword") # here goes your username and password
- # the code below is by https://scratch.mit.edu/users/Hans5958/ from here: https://scratch.mit.edu/discuss/topic/435282
- done = False
- offset = 0
- page = 1
- followers = []
- while done == False:
- with requests.get(f"https://api.scratch.mit.edu/users/-Rix-/followers?offset={offset}") as request:
- followers.extend(request.json())
- if (len(request.json()) != 20):
- done = True
- else:
- offset += 20
- page += 1
- for follower in followers:
- session.get_user(follower).post_comment("This is an automated message! RNTAS: " + str(ra.randint(1, 10000)) # this command posts a comment
- t.sleep(2.5) # this is the comment cooldown
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement