Advertisement
Mitiny21

[PYTHON] TWITCH FOLLOW BOT

Aug 23rd, 2019
2,410
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.99 KB | None | 0 0
  1. import selenium
  2. from selenium import webdriver
  3. from selenium.webdriver.common.proxy import Proxy, ProxyType
  4. from time import sleep
  5. from os import system
  6.  
  7.  
  8.  
  9. print('       /$$$$$$          \n'
  10.       '      /$$__  $$          \n'
  11.       '     | $$  \__/ /$$   /$$\n'
  12.       '     | $$      | $$  | $$\n'
  13.       '     | $$      | $$  | $$\n'
  14.       '     | $$    $$| $$  | $$\n'
  15.       '     |  $$$$$$/|  $$$$$$/\n'
  16.       '      \______/  \______/ \n'
  17.       '     =-    1 . 0       -=\n')
  18.  
  19. try:
  20.     contas_folder = open('contas.txt', 'r')
  21.     contas = contas_folder.readlines()
  22.     contas_folder = open('contas.txt', 'r')
  23.     contas_len = len(contas_folder.readlines())
  24. except:
  25.     print('[!] ERROR > Diretorio contas.txt nao encontrado :( \n \n ')
  26.     system('pause')
  27.  
  28. link = str(input('[?] - Insira a URL da canal da twitch :  '))
  29.  
  30. num = -1
  31.  
  32. def main():
  33.     global num
  34.     while int(num) <= int(contas_len):
  35.         try:
  36.             num += 1
  37.             browser = webdriver.Chrome()
  38.             browser.get(link)
  39.             browser.find_element_by_xpath('//*[@id="root"]/div/div[2]/nav/div/div[3]/div[3]/div/div[1]/div[1]/button/div/div').click()
  40.             sleep(2)
  41.             browser.find_element_by_xpath('/html/body/div[2]/div/div/div/div/div/div[1]/div/div/form/div/div[1]/div/div[2]/input').send_keys(contas[num][:-1])
  42.             browser.find_element_by_xpath('/html/body/div[2]/div/div/div/div/div/div[1]/div/div/form/div/div[2]/div/div[1]/div[2]/div[1]/input').send_keys('rikmak21')
  43.             sleep(2)
  44.             browser.find_element_by_xpath('/html/body/div[2]/div/div/div/div/div/div[1]/div/div/form/div/div[3]/button').click()
  45.             sleep(4)
  46.             browser.find_element_by_xpath('//*[@id="root"]/div/div[2]/div[2]/main/div[1]/div/div[2]/div[2]/div[1]/div/div/div[1]').click()
  47.             sleep(4)
  48.             browser.close()
  49.         except:
  50.             print("[!] - ERROR - Iniciando Sessao Novamente ... ")
  51.             browser.close()
  52.             main()
  53. main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement