Skip to content

Instantly share code, notes, and snippets.

Created July 25, 2016 00:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/f595aef41fe18febf8a7d5ad13dca04e to your computer and use it in GitHub Desktop.
Save anonymous/f595aef41fe18febf8a7d5ad13dca04e to your computer and use it in GitHub Desktop.
# -*- coding: utf-8 -*-
import selenium
from selenium import webdriver
import contextlib
import selenium.webdriver.support.ui as ui
from selenium.webdriver.common.keys import Keys
import string
import time
import sys
reload(sys)
import os
import random
import shutil
sys.setdefaultencoding('Cp1252')
import twill
#chrome_options = webdriver.ChromeOptions()
#chrome_options.add_argument('--proxy-server=%s' % PROXY)
browser = selenium.webdriver.Chrome("C:\chromedriver.exe")
def CreateAccount(email):
browser.get('http://upload.xvideos.com/account/create')
time.sleep(10)
mainWin = browser.current_window_handle
browser.find_element_by_xpath('//*[@id="email_text"]').send_keys(email)
time.sleep(1/2)
username = str(email)[:str(email).find('@nincsmail.com')]
browser.find_element_by_xpath('//*[@id="profile_name_text"]').send_keys(username)
time.sleep(1)
browser.find_element_by_xpath('//*[@id="password_text"]').send_keys("Xvideos123")
time.sleep(1)
browser.find_element_by_xpath('//*[@id="password_confirm_text"]').send_keys('Xvideos123')
time.sleep(1)
browser.find_element_by_xpath('//*[@id="nom_text"]').send_keys(username)
time.sleep(1)
browser.find_element_by_xpath('//*[@id="prenom_text"]').send_keys('John')
time.sleep(1)
browser.find_element_by_xpath('//*[@id="birth_year_select"]').send_keys('1991')
time.sleep(1)
browser.find_element_by_xpath('//*[@id="birth_month_select"]').send_keys('November')
time.sleep(1)
browser.find_element_by_xpath('//*[@id="birth_day_select"]').send_keys('11')
time.sleep(1)
browser.switch_to_frame(browser.find_elements_by_tag_name("iframe")[0])
browser.find_element_by_xpath('/html/body/div[2]/div[3]/div[1]/div/div').click()
time.sleep(2)
browser.find_element_by_xpath('//*[@id="recaptcha-anchor"]/div[2]').click()
browser.switch_to.window(mainWin)
time.sleep(1)
browser.find_element_by_xpath('//*[@id="signupForm"]/div[1]/div[3]/input[2]').click()
CreateAccount('sexyandhot123@nincsmail.com')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment