Message
Message
import requests
from colorama import Fore
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
import undetected_chromedriver as uc
from selenium.webdriver.support.ui import Select
API_BASE_URL = "https://api.tempmail.lol/v2"
if email:
options = uc.ChromeOptions()
driver = uc.Chrome(options=options)
driver.get("https://x.com/i/flow/signup")
Select(driver.find_element(By.ID, "SELECTOR_1")).select_by_value("1") #
January
Select(driver.find_element(By.ID, "SELECTOR_2")).select_by_value("1") #
Day 1
Select(driver.find_element(By.ID, "SELECTOR_3")).select_by_value("2000") #
Year 2000
time.sleep(2)
# Password step
WebDriverWait(driver, 10).until(EC.presence_of_element_located((By.NAME,
"password")))
password_field = driver.find_element(By.NAME, "password")
password_field.send_keys("Chorus100$")
time.sleep(2)
driver.find_element(By.XPATH, "//button[contains(., 'Sign up')]").click()
# Skip Avatar step with WebDriverWait
WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.XPATH,
"//button[@data-testid='ocfSelectAvatarSkipForNowButton']"))).click()
time.sleep(2)
# Follow topics
topics = ["Entertainment", "Music", "Sports"]
for topic in topics:
topic_button = driver.find_element(By.XPATH, f"//div[@aria-
label='Follow {topic} Topic']")
topic_button.click()
time.sleep(2)
# Follow button
WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.XPATH,
"//button[.//span[contains(text(), 'Follow')]]"))).click()
time.sleep(2)
# User Recommendations
WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.XPATH,
"//button[@data-testid='ocfURTUserRecommendationsNextButton']"))).click()
time.sleep(2)
break
time.sleep(5)
driver.quit()
if __name__ == "__main__":
main()