Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import os
- from selenium import webdriver
- from selenium.webdriver.chrome.options import Options
- from selenium.webdriver.common.keys import Keys
- import time
- from multiprocessing import Process, Lock, Pool, TimeoutError
- from multiprocessing.dummy import Pool as ThreadPool
- import sys
- target_url = 'https://chaturbate.com/username'
- def web_instance(info):
- split_info = info.split("|")
- proxy = split_info[1]
- userInfo = split_info[0].split(":")
- username = userInfo[0]
- password = userInfo[1]
- chrome_options = Options()
- chrome_options.add_argument("--proxy-server=%s" % proxy)
- chrome_options.add_argument("--headless")
- chrome_options.binary_location = r'C:\Users\%USERNAME%\AppData\Local\Google\Chrome SxS\Application\chrome.exe'
- driver = webdriver.Chrome(executable_path=os.path.abspath("chromedriver"), chrome_options=chrome_options)
- driver.get('https://chaturbate.com')
- passField = driver.find_element_by_css_selector("#id_password")
- nameField = driver.find_element_by_css_selector("#id_username")
- passField.send_keys(password)
- nameField.send_keys(username)
- passField.send_keys(keys.RETURN)
- time.sleep(5)
- driver.get(target_url)
- if __name__ == '__main__':
- userInfo = open("./user_info.txt", "r")
- proxyInfo = open("./proxies.txt", "r")
- info = []
- for line in userInfo:
- info.append(line)
- lc = 0
- for line in proxyInfo:
- info[lc] = info[lc] + "|" + line
- lc = lc + 1
- pool_count = len(info)
- pool = ThreadPool(pool_count)
- pool.map(web_instance, info)
- pool.close()
- pool.join()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement