Human check of cloudflare was added in the site I always scrape using python selenium.
I looked up some ways to skip this human check such as undetected_chromedriver or zenrows, even using cookies to try to deceive cloudflare, but it still did not work.
Does anyone have good idea to skip it?
My code is as below.
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import Select
from selenium.webdriver.chrome.service import Service
service = Service(executable_path='./chromedriver')
driver = webdriver.Chrome(service=service)
# driver = webdriver.Chrome(executable_path='./chromedriver')
url = 'target'
driver.get(url)
username_input = driver.find_element(By.ID, "userLoginForm.userId")
username_input.send_keys("username")
password_input = driver.find_element(By.ID, "userLoginForm.userPasswd")
password_input.send_keys("password")
loginBtn = driver.find_element(By.XPATH, '//*[@id="js-main"]/div/div[2]/div/input')
loginBtn.click()
Please help me to skip cloudflare's human check. Thank you in advance.
put a 60 seconds sleep and open a new tab keeping your driver at the first tab solve the captcha manually then close the tab and return to your original tab that the driver is currently on and then go to the destination you wanted to scrape and captcha should be gone and you can go on with your day