Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import random
- from selenium import webdriver
- from selenium.webdriver.firefox.firefox_binary import FirefoxBinary
- binary = FirefoxBinary('/usr/bin/firefox')
- driver = webdriver.Firefox(firefox_binary=binary)
- driver.get('https://twitch.tv/signup')
- username = ("rodeobob" + str(random.randint(2500, 3500)))
- password = ("QuarkmitSosse!")
- email = (username + "@phaantm.de")
- #username_input = WebDriverWait(driver, 5).until(EC.presence_of_element_located((By.XPATH, get_page_element("/html/body/div[2]/div/div/div/div[1]/div/div/form/div/div[1]/div/div[2]/input"))))
- username_input = driver.find_element_by_xpath("//div[@data-a-target='signup-username-input']//input[@class='tw-block tw-border-bottom-left-radius-medium tw-border-bottom-right-radius-medium tw-border-top-left-radius-medium tw-border-top-right-radius-medium tw-font-size-6 tw-full-width tw-input tw-pd-l-1 tw-pd-r-1 tw-pd-y-05']")
- username_input.send_keys(username)
- click_pass = driver.find_element_by_xpath("//div[@class='password-input__container tw-relative']")
- click_pass.click()
- user_pass = driver.find_element_by_xpath("//div[@data-a-target='signup-password-input']//input[@class='tw-block tw-border-bottom-left-radius-medium tw-border-bottom-right-radius-medium tw-border-top-left-radius-medium tw-border-top-right-radius-medium tw-font-size-6 tw-full-width tw-input tw-pd-l-1 tw-pd-r-1 tw-pd-y-05']")
- user_pass.send_keys(password)
- choose_month = driver.find_element_by_xpath("//select[@data-a-target='birthday-month-select']//option[text()='January']")
- choose_month.click()
- choose_day = driver.find_element_by_xpath("//div[@data-a-target='birthday-date-input']//input[@class='tw-block tw-border-bottom-left-radius-medium tw-border-bottom-right-radius-medium tw-border-top-left-radius-medium tw-border-top-right-radius-medium tw-font-size-6 tw-full-width tw-input tw-pd-l-1 tw-pd-r-1 tw-pd-y-05']")
- choose_day.send_keys("1")
- choose_year = driver.find_element_by_xpath("//div[@data-a-target='birthday-year-input']//input[@class='tw-block tw-border-bottom-left-radius-medium tw-border-bottom-right-radius-medium tw-border-top-left-radius-medium tw-border-top-right-radius-medium tw-font-size-6 tw-full-width tw-input tw-pd-l-1 tw-pd-r-1 tw-pd-y-05']")
- choose_year.send_keys("1970")
- choose_year = driver.find_element_by_xpath("//div[@data-a-target='signup-email-input']//input[@class='tw-block tw-border-bottom-left-radius-medium tw-border-bottom-right-radius-medium tw-border-top-left-radius-medium tw-border-top-right-radius-medium tw-font-size-6 tw-full-width tw-input tw-pd-l-1 tw-pd-r-1 tw-pd-y-05']")
- choose_year.send_keys(email)
- print(driver.title)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement