Extra user API - Quantum-Codes/ScraGet GitHub Wiki
Only provided by Scratch.
Didn't find what you were looking for? Search here. If still you don't find it, make an issue suggesting it.
from ScraGet import ScraGet #import package
user_extras = ScraGet.user_extras() #create object
user_extras.get_profile("griffpatch") #update data for profile
user_extras.get_followers("Ankit_Anmol") #gets followers(takes many APi calls. So it's slow)
user_extras.get_messages("Scratch") #gets message notification count
user_extras.get_projects("Chiroyce") #gets a list of projects the user made
user_extras.check_user("hello") #checks if username is valid and if already taken
print(user_extras.messages, user_extras.follower_count) #print required info from data*
user_extras.messages_response_time
user_extras.messages_response_object #raw response object
user_extras.messages_status_code
user_extras.messages
user_extras.profile_status_code
user_extras.profile_response_time
user_extras.profile_response_object #raw response object
user_extras.label_name
user_extras.featured_project_data #raw data... better not use this lol
user_extras.featured_project_id
user_extras.creator_id
user_extras.user
user_extras.creator
user_extras.change_time
user_extras.featured_project_label_id
user_extras.title
user_extras.thumbnail
user_extras.pfp
user_extras.id
user_extras.followers_response_objects #list of raw response objects
user_extras.followers #list of followers (with people who unfollowed)
user_extras.follower_count #Number of followers (includes unfollowers too)
user_extras.user_response_object
user_extras.user_response_time
user_extras.user_status_code
user_extras.username #username
user_extras.valid #Whether username is valid or not
user_extras.taken #whether it's taken or not
user_extras.projects_response_objects
user_extras.projects #list of projects
user_extras.project_count #no of projects
Aim: Inputting a username to check if its valid and if it's already used or not. Uses get_user class.
Code:
from ScraGet import ScraGet
username = ScraGet.get_user_extra()
user = input("Username to check: ").strip()
username.check_user(user)
if username.valid:
if username.taken:
print(f"{user} is valid but already taken")
else:
print(f"{user} is valid and not taken!")
else:
print(f"{user} is invalid..")