I have a python code runnin both keyboard and mouse automation, but when I try to read the content of a webpage with selenium(just need to use the function "driver.find_element"), then the anti-bot triggers and the data Im scrapyin is blocked by some captcha issue as they tell on a message displayed in the page, although the only captcha is solved in the begining of the navegation, much earlier.
I use the libraries "undetected selenium", "keyboard" and "pyautogui" and all i need is to get the text of some elements in diferents pages.
The button to go to the next page just exist on the previous one, so when some block hapen, it become impossible to reach the end of all data.
I've already tried seleniumbase, selenium_stealth, and I'm usin this set of options:
from selenium.webdriver.common.desired_capabilities import DesiredCapabilitiesimport loggingcaps = DesiredCapabilities.CHROME.copy()caps['goog:loggingPrefs'] = {'browser': 'OFF'}options.add_argument("--user-agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36")options.add_argument("--user-data-dir=" + folder_path) options.add_argument("--disable-popup-blocking")options.add_argument("--user-data-dir=C:\\Users\\PC\\AppData\\Local\\Google\\Chrome\\User Data")options.add_argument("--profile-directory=Default") options.add_argument('--ignore-certificate-errors')options.add_argument('--allow-running-insecure-content')options.add_argument("--disable-blink-features=AutomationControlled") options.accept_insecure_certs = Trueoptions.add_argument("--ignore-gpu-blacklist") options.add_argument("--use-gl") options.add_argument( "--disable-web-security")options.add_argument("--log-level=3")options.add_argument("--headed=True")options.add_argument("--no-sandbox")driver = uc.Chrome(driver_executable_path=chromedriver_path, options=options,desired_capabilities=caps)driver.execute_script("Object.defineProperty(navigator, 'webdriver', {get: () => False})") driver.execute_script("""console.log = function() {};""")But somehow, everytime I try to find an element by selenium, I cant go to the next page and shall go back to the first page.
Someone know why is it happening and how could I handle it?