paster442

Get random Scratch user

Sep 1st, 2021 (edited)
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.57 KB | None | 0 0
  1. from scratchclient import ScratchSession as login
  2. from random import randint
  3. from time import time
  4.  
  5. start_time = time()
  6.  
  7. session = login("username", "password") # replace this with your username and password
  8.  
  9. def anti_spam():
  10.     empty_string = ""
  11.     for _ in range(randint(1, 500)):
  12.         empty_string += "\u00AD" # soft hyphen to avoid spam
  13.     return empty_string
  14.  
  15. parent_id = ""
  16. commentee_id = randint(139, 80000000)
  17. session.get_user("user").post_comment(anti_spam(), parent_id, commentee_id)
  18.  
  19. print("Execution time: " + str(round((time() - start_time), 3)) + " s")
Add Comment
Please, Sign In to add comment