ExamV1

Twitch Follow Remover

Dec 20th, 2021 (edited)
818
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.58 KB | None | 0 0
  1. #This will allow you to purge all people you are following.
  2.  
  3. from selenium import webdriver
  4. import time
  5. print("Twitch Follows Purge by Exam")
  6. user = input("Type in username:\n")
  7. password = input("Type in password:\n")
  8.  
  9. url = "https://www.twitch.tv/directory/following/channels"
  10. browser = webdriver.Chrome(service_log_path=None)
  11. browser.get(url)
  12.  
  13. browser.find_element_by_id('login-username').send_keys(user)
  14. browser.find_element_by_id('password-input').send_keys(password)
  15. time.sleep(1)
  16. browser.find_element_by_xpath('/html/body/div[3]/div/div/div/div/div/div[1]/div/div/div[3]/form/div/div[3]/button').click()
  17. time.sleep(6)
  18. try:
  19.     browser.find_element_by_xpath('/html/body/div[3]/div/div/div/div/div/div/div/div[3]/div[2]/button').click()
  20.     browser.find_element_by_id('home_children_body')
  21.  
  22. except:
  23.     print("Complete Captcha! \n Once complete, wait and don't touch anything! \n if there is no captcha wait 30 seconds!")
  24. for i in range(1, 31):
  25.     time.sleep(1)
  26.     print(i)
  27.  
  28. print("Purging Followers!")
  29.  
  30. time.sleep(1)
  31. try:
  32.     browser.find_element_by_xpath('/html/body/div[3]/div/div/div/div/div/div/div/div[3]/div[2]/button').click()
  33. except:
  34.     pass
  35. while True:
  36.     time.sleep(3)
  37.     for i in range(100):
  38.         i = i + 1
  39.         browser.find_element_by_xpath(f'/html/body/div[1]/div/div[2]/div[2]/main/div[2]/div[3]/div/div/div/div/div/div[4]/div[{i}]/div/div/div/div[3]/div/div[3]/div[1]/div[1]/button').click()
  40.         browser.find_element_by_xpath(f'/html/body/div[3]/div/div/div/div/div/div[1]/div[3]/div/button').click()
  41.  
  42.     time.sleep(3)
  43.     browser.refresh()
Add Comment
Please, Sign In to add comment