Skip to content

Instantly share code, notes, and snippets.

@Sid72020123
Last active October 3, 2021 10:15
Show Gist options
  • Save Sid72020123/c8293359b57c93ca908cfc246079b02b to your computer and use it in GitHub Desktop.
Save Sid72020123/c8293359b57c93ca908cfc246079b02b to your computer and use it in GitHub Desktop.
Python Program to automatically Invite a user's Followers to a studio
import time
import scratchconnect
user = scratchconnect.ScratchConnect("Username", "Password")
all_followers = user.followers(all=True)
invited_followers = []
for i in range(0, len(all_followers)):
processing = all_followers[i]
for j in range(0, len(processing)):
invited_followers.append(processing[j]['username'])
studio = user.connect_studio(studio_id=123456)
for i in range(0, len(invited_followers)):
status = studio.invite_curator(invited_followers[i]).json()["status"]
if status == "success":
print(f"Invited {invited_followers[i]}")
else:
print(f"Failed to Invite {invited_followers[i]}")
time.sleep(1) # To reduce the load on Scratch Servers
@gosoccerboy5
Copy link

Cool!

@Sid72020123
Copy link
Author

Cool!

Thanks!

@yeti0904
Copy link

nice program

@Sid72020123
Copy link
Author

nice program

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment