def runBot(): for i in range(Config['amount_of_account']): account_info = new_account(country=Config['country']) account = CreateAccount(account_info['email'], account_info['username'], account_info['password'], account_info['name'], Config['amount_of_account']) account.createaccount()
def runBot(): for i in range(Config['amount_of_account']): account_info = new_account(country=Config['country']) account = CreateAccount( account_info['email'], account_info['username'], account_info['password'], account_info['name'], Config['amount_of_account']) account.createaccount()
def runBot(): for i in range(Config['amount_of_account']): if (Config['use_custom_proxy'] == True): with open(Config['proxy_file_path'], 'r') as file: content = file.read().splitlines() for proxy in content: account_info = new_account() account = CreateAccount(account_info['email'], account_info['username'], account_info['password'], account_info['name'], Config['amount_of_account'], proxy=proxy) account.createaccount() else: account_info = new_account() account = CreateAccount( account_info['email'], account_info['username'], account_info['password'], account_info['name'], Config['amount_of_account'], Config['use_custom_proxy'], Config['use_local_ip_address']) account.createaccount()
def runBot(): for i in range(Config["amount_of_account"]): account_info = new_account() account = CreateAccount( account_info["email"], account_info["username"], account_info["password"], account_info["name"], Config["amount_of_account"], Config["use_custom_proxy"], Config["use_local_ip_address"], Config["proxy_file_path"], ) account.createaccount()
def createaccount(self, proxy=None): chrome_options = webdriver.ChromeOptions() if proxy != None: chrome_options.add_argument('--proxy-server=%s' % proxy) # chrome_options.add_argument('headless') # ua = UserAgent() # user_agent = ua.random chrome_options.add_argument('--user-agent="Mozilla/5.0 (Windows Phone 10.0; Android 4.2.1; Microsoft; Lumia 640 XL LTE) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Mobile Safari/537.36 Edge/12.10166"') # chrome_options.add_argument("--incognito") chrome_options.add_argument('window-size=1200x600') driver = webdriver.Chrome(chrome_options=chrome_options) print('Opening Browser') driver.get(self.url) print('Browser Opened') sleep(5) action_chains = ActionChains(driver) sleep(5) account_info = accnt.new_account() # fill the email value print('Filling email field') email_field = driver.find_element_by_name('emailOrPhone') print(email_field) sleep(1) action_chains.move_to_element(email_field) print(account_info["email"]) email_field.send_keys(str(account_info["email"])) sleep(2) # fill the fullname value print('Filling fullname field') fullname_field = driver.find_element_by_name('fullName') action_chains.move_to_element(fullname_field) fullname_field.send_keys(account_info["name"]) sleep(2) # fill username value print('Filling username field') username_field = driver.find_element_by_name('username') action_chains.move_to_element(username_field) username_field.send_keys(account_info["username"]) sleep(2) # fill password value print('Filling password field') password_field = driver.find_element_by_name('password') action_chains.move_to_element(password_field) passW = account_info["password"] print(passW) password_field.send_keys(str(passW)) sleep(1) sleep(2) submit = driver.find_element_by_xpath( '//*[@id="react-root"]/section/main/article/div[2]/div[1]/div/form/div[7]/div/button') action_chains.move_to_element(submit) sleep(2) submit.click() sleep(3) try: age_button = driver.find_element_by_xpath( "//input[@name='ageRadio' and @value='above_18']") age_button.click() sleep(2) next_button = driver.find_elements_by_xpath('//button[text()="Next"]')[1] next_button.click() except Exception as e : pass sleep(4) # After the first fill save the account account_info store(account_info) # Activate the account confirm_url = get_activation_url(account_info['email']) logging.info("The confirm url is {}".format(confirm_url)) driver.get(confirm_url) driver.close()
def createaccount(self, proxy=None): chrome_options = webdriver.ChromeOptions() if proxy != None: chrome_options.add_argument('--proxy-server=%s' % proxy) # chrome_options.add_argument('headless') ua = UserAgent() user_agent = ua.random # user_agent = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.120 Safari/537.36' chrome_options.add_argument('--user-agent="%s"' % user_agent) chrome_options.add_argument("--incognito") chrome_options.add_argument('window-size=1200x600') chrome_options.add_argument('--no-sandbox') driver = webdriver.Chrome(chrome_options=chrome_options, executable_path=config.Config['chromedriver_path']) print('Opening Browser') driver.get(self.url) print('Browser Opened') sleep(5) action_chains = ActionChains(driver) sleep(5) account_info = accnt.new_account() # fill the email value print('Filling email field') email_field = driver.find_element_by_name('emailOrPhone') print(email_field) sleep(1) action_chains.move_to_element(email_field) print(account_info["email"]) email_field.send_keys(str(account_info["email"])) sleep(2) # fill the fullname value print('Filling fullname field') fullname_field = driver.find_element_by_name('fullName') action_chains.move_to_element(fullname_field) fullname_field.send_keys(account_info["name"]) sleep(2) # fill username value print('Filling username field') username_field = driver.find_element_by_name('username') action_chains.move_to_element(username_field) username_field.send_keys(account_info["username"]) sleep(2) # fill password value print('Filling password field') password_field = driver.find_element_by_name('password') action_chains.move_to_element(password_field) passW = account_info["password"] print(passW) password_field.send_keys(str(passW)) sleep(1) sleep(2) submit = driver.find_element_by_xpath( '//*[@id="react-root"]/section/main/article/div[2]/div[1]/div/form/div[7]/div/button') action_chains.move_to_element(submit) sleep(2) submit.click() sleep(3) try: age_button = driver.find_element_by_xpath( "//input[@name='ageRadio' and @value='above_18']") age_button.click() sleep(2) next_button = driver.find_elements_by_xpath('//button[text()="Next"]')[1] next_button.click() except Exception as e : pass sleep(4) search_button = driver.find_element_by_xpath('//input[@placeholder="Search"]') action_chains.move_to_element(search_button) search_button.send_keys('letsbefity') # After the first fill save the account account_info store(account_info) """ Currently buggy code. """ # Activate the account # confirm_url = get_activation_url(account_info['email']) # logging.info("The confirm url is {}".format(confirm_url)) # driver.get(confirm_url) driver.close()
def createaccount(self, proxy=None): chrome_options = webdriver.ChromeOptions() if proxy != None: chrome_options.add_argument('--proxy-server=%s' % proxy) # chrome_options.add_argument('headless') # ua = UserAgent() # user_agent = ua.random chrome_options.add_argument( '--user-agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.80 Safari/537.36"' ) # chrome_options.add_argument("--incognito") chrome_options.add_argument('window-size=1200x600') driver = webdriver.Chrome( chrome_options=chrome_options, executable_path=config.Config['chromedriver_path']) print('Opening Browser') driver.get(self.url) print('Browser Opened') sleep(5) action_chains = ActionChains(driver) sleep(5) account_info = accnt.new_account() # fill the email value print('Filling email field') email_field = driver.find_element_by_name('emailOrPhone') print(email_field) sleep(1) action_chains.move_to_element(email_field) print(account_info["email"]) email_field.send_keys(str(account_info["email"])) sleep(2) # fill the fullname value print('Filling fullname field') fullname_field = driver.find_element_by_name('fullName') action_chains.move_to_element(fullname_field) fullname_field.send_keys(account_info["name"]) sleep(2) # fill username value print('Filling username field') username_field = driver.find_element_by_name('username') action_chains.move_to_element(username_field) username_field.send_keys(account_info["username"]) sleep(2) # fill password value print('Filling password field') password_field = driver.find_element_by_name('password') action_chains.move_to_element(password_field) passW = account_info["password"] print(passW) password_field.send_keys(str(passW)) sleep(1) sleep(2) submit = driver.find_element_by_xpath( '//*[@id="react-root"]/section/main/div/div/div[1]/div/form/div[7]/div/button' ) action_chains.move_to_element(submit) sleep(2) submit.click() sleep(3) try: month_button = driver.find_element_by_xpath( '//*[@id="react-root"]/section/main/div/div/div[1]/div/div[4]/div/div/span/span[1]/select' ) month_button.click() month_button.send_keys(account_info["birthday"].split(" ")[0]) sleep(1) day_button = driver.find_element_by_xpath( '//*[@id="react-root"]/section/main/div/div/div[1]/div/div[4]/div/div/span/span[2]/select' ) day_button.click() day_button.send_keys(account_info["birthday"].split[" "][1][:-1]) sleep(1) year_button = driver.find_element_by_xpath( '//*[@id="react-root"]/section/main/div/div/div[1]/div/div[4]/div/div/span/span[3]/select' ) year_button.click() year_button.send_keys(account_info["birthday"].split[" "][2]) sleep(2) next_button = driver.find_elements_by_xpath( '//*[@id="react-root"]/section/main/div/div/div[1]/div/div[6]/button' ) next_button.click() except Exception as e: pass sleep(4) # After the first fill save the account account_info store(account_info) """ Currently buggy code. """ # Activate the account # confirm_url = get_activation_url(account_info['email']) # logging.info("The confirm url is {}".format(confirm_url)) # driver.get(confirm_url) driver.close()
def createaccount(self, proxy=None): chrome_options = webdriver.ChromeOptions() if proxy != None: chrome_options.add_argument('--proxy-server=%s' % proxy) chrome_options.add_argument('headless') chrome_options.add_argument('window-size=1200x600') driver = webdriver.Chrome(chrome_options=chrome_options) print('Opening Browser') driver.get(self.url) print('Browser Opened') sleep(5) print('Generating username') name = accnt.username() print('username Generated') # username action_chains = ActionChains(driver) sleep(5) # username account_info = accnt.new_account() # fill the email value print('Filling email field') email_field = driver.find_element_by_name('emailOrPhone') email_field.send_keys(accnt.genEmail()) sleep(1) action_chains.move_to_element(email_field) email_field.send_keys(account_info["email"]) sleep(2) # fill the fullname value print('Filling fullname field') fullname_field = driver.find_element_by_name('fullName') action_chains.move_to_element(fullname_field) fullname_field.send_keys(account_info["name"]) sleep(2) # fill username value print('Filling username field') username_field = driver.find_element_by_name('username') action_chains.move_to_element(username_field) username_field.send_keys(account_info["username"]) sleep(2) # fill password value print('Filling password field') password_field = driver.find_element_by_name('password') action_chains.move_to_element(password_field) passW = account_info["password"] password_field.send_keys(passW) sleep(1) sleep(2) submit = driver.find_element_by_xpath( '//*[@id="react-root"]/section/main/article/div[2]/div[1]/div/form/div[7]/div/button' ) action_chains.move_to_element(submit) sleep(2) submit.click() sleep(3) age_button = driver.find_element_by_xpath( "//input[@name='ageRadio' and @value='above_18']") age_button.click() sleep(2) next_button = driver.find_elements_by_xpath( '//button[text()="Next"]')[1] next_button.click() sleep(4) # After the first fill save the account account_info store(account_info) # Activate the account confirm_url = get_activation_url(account_info['email']) logging.info("The confirm url is {}".format(confirm_url)) driver.get(confirm_url) driver.close()