Last active
October 3, 2021 10:15
-
-
Save Sid72020123/c8293359b57c93ca908cfc246079b02b to your computer and use it in GitHub Desktop.
Python Program to automatically Invite a user's Followers to a studio
This file contains 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 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 |
Cool!
Thanks!
nice program
nice program
Thanks!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Cool!