Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #This will allow you to purge all people you are following.
- from selenium import webdriver
- import time
- print("Twitch Follows Purge by Exam")
- user = input("Type in username:\n")
- password = input("Type in password:\n")
- url = "https://www.twitch.tv/directory/following/channels"
- browser = webdriver.Chrome(service_log_path=None)
- browser.get(url)
- browser.find_element_by_id('login-username').send_keys(user)
- browser.find_element_by_id('password-input').send_keys(password)
- time.sleep(1)
- 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()
- time.sleep(6)
- try:
- browser.find_element_by_xpath('/html/body/div[3]/div/div/div/div/div/div/div/div[3]/div[2]/button').click()
- browser.find_element_by_id('home_children_body')
- except:
- print("Complete Captcha! \n Once complete, wait and don't touch anything! \n if there is no captcha wait 30 seconds!")
- for i in range(1, 31):
- time.sleep(1)
- print(i)
- print("Purging Followers!")
- time.sleep(1)
- try:
- browser.find_element_by_xpath('/html/body/div[3]/div/div/div/div/div/div/div/div[3]/div[2]/button').click()
- except:
- pass
- while True:
- time.sleep(3)
- for i in range(100):
- i = i + 1
- 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()
- browser.find_element_by_xpath(f'/html/body/div[3]/div/div/div/div/div/div[1]/div[3]/div/button').click()
- time.sleep(3)
- browser.refresh()
Add Comment
Please, Sign In to add comment