I am trying to login to TikTok with Selenium, but every time it gives me the message "Too many attempts. Try again later.". If I enter my email and password manually it works, if I use Selenium it doesn't.
WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.XPATH, "//input[@placeholder='Email or username']"))).send_keys(email)
WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.XPATH, "//input[@placeholder='Password']"))).send_keys(password)
WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.XPATH, "//button[@type='submit']"))).click()`
CodePudding user response:
Some websites have services that can detect Selenium and then block you.
The three main ways of avoiding Selenium-detection by websites are:
2: SeleniumBase in undetected mode. (Use --undetected
or --uc
as a pytest
command-line option.)