Created
July 30, 2023 14:12
-
-
Save alperensert/ac82629c03c0392a057ba3183d9e8001 to your computer and use it in GitHub Desktop.
Register to Roblox Bypassing FunCaptcha with CapSolver and Selenium [PYTHON]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import random | |
from selenium import webdriver | |
from selenium.webdriver.chrome.service import Service | |
from selenium.webdriver.support.select import Select | |
from selenium.webdriver.support.wait import WebDriverWait | |
from selenium.webdriver.support import expected_conditions as EC | |
from selenium.webdriver.common.by import By | |
from random_user import RandomRobloxUser | |
def main(): | |
current_working_directory = os.getcwd() | |
chrome_driver_path = current_working_directory + "/chromedriver" | |
capsolver_extension_path = current_working_directory + "/capsolver_extension" | |
chrome_service = Service(executable_path=chrome_driver_path) | |
chrome_options = webdriver.ChromeOptions() | |
chrome_options.add_argument( | |
"--load-extension={0}".format(capsolver_extension_path)) | |
driver = webdriver.Chrome(service=chrome_service, options=chrome_options) | |
driver.get("https://roblox.com") | |
random_user = RandomRobloxUser() | |
wait = WebDriverWait(driver, timeout=100) | |
# we have to wait birth_month for evidence of page is fully loaded | |
birth_month = Select(wait.until( | |
EC.visibility_of_element_located((By.CSS_SELECTOR, "#MonthDropdown")))) | |
birth_month.select_by_index(random_user.birth_month) | |
birth_day = Select(driver.find_element(By.CSS_SELECTOR, "#DayDropdown")) | |
birth_day.select_by_index(random_user.birth_day) | |
birth_year = Select(driver.find_element(By.CSS_SELECTOR, "#YearDropdown")) | |
birth_year.select_by_value(random_user.birth_year) | |
username = driver.find_element(By.CSS_SELECTOR, "#signup-username") | |
username.send_keys(random_user.user_name) | |
password = driver.find_element(By.CSS_SELECTOR, "#signup-password") | |
password.send_keys(random_user.password) | |
gender = driver.find_element( | |
By.CSS_SELECTOR, random.choice(["#FemaleButton", "#MaleButton"])) | |
gender.click() | |
signup_button = driver.find_element(By.CSS_SELECTOR, "#signup-button") | |
wait.until(EC.element_to_be_clickable(signup_button)) | |
signup_button.click() | |
wait.until(EC.url_changes(driver.current_url)) | |
driver.quit() | |
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from faker import Faker | |
import random | |
class RandomRobloxUser: | |
user_name: str | |
password: str | |
birth_day: int | |
birth_month: int | |
birth_year: str | |
def __init__(self) -> None: | |
faker = Faker() | |
self.user_name = faker.user_name() + str(random.randint(99, 99999)) | |
self.password = faker.password() | |
self.birth_day = RandomRobloxUser.random_birth_day() | |
self.birth_month = RandomRobloxUser.random_birth_month() | |
self.birth_year = RandomRobloxUser.random_birth_year() | |
@staticmethod | |
def random_birth_month() -> int: | |
return random.randint(1, 12) | |
@staticmethod | |
def random_birth_day() -> int: | |
return random.randint(1, 30) | |
@staticmethod | |
def random_birth_year() -> str: | |
return str(random.randint(1970, 2009)) |
Thank you, @Allen-Taylor.
No, I do not have one. You can contact me by email at [email protected] or via Discord using the username quasm.
How do i add API key automatically?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Great work here.
Can I contact you directly? Do you have a TG?