Code: import scratchattach as sa SESSION_ID = "" # you USERNAME = "AYSemkiv" # exact username you want to comment on # Try modern path first; fall back to legacy API if needed try: # Newer: login_by_id accepts username and returns a session with get_user session = sa.login_by_id(SESSION_ID, username=USERNAME) try: user = session.get_user(USERNAME) # newer method except AttributeError: user = session.connect_user(USERNAME) # fallback for mid-era versions except TypeError: # Very old: Session() + set_session_id, then connect_user only session = sa.Session() session.set_session_id(SESSION_ID) user = session.connect_user(USERNAME) # Post the comment to your profile user.post_comment("This is a test comment made possible by scratchattach!") print(f"✅ Comment posted to @{USERNAME}'s profile.")
My scratchattach GitHub: https://github.com/Python-projects123/Scratchattachgitpage GitHub is verified safe. What is scratchattach? Scratchattach is module on Python which lets you do stuff on scratch without being on Scratch. You can post comments, like and fav and more! Official GitHub: https://github.com/TimMcCool/scratchattach/wiki/Examples or https://scratchattach.tim1de.net/