with SB(uc=True, Headless=True) as sb:
for url in urls:
sb.uc_open_with_reconnect(url, 5)
sb.uc_gui_handle_captcha()
time.sleep(2)
has_next_page = True
I'm facing a website with a CAPTCHA. In NON HEADLESS mode, that code works properly, but in headless mode, it doesn't because sb.uc_gui_handle_captcha() needs PyAutoGUI, and in headless mode, PyAutoGUI can't run.
I read in the seleniumbase documentation that the SB manager includes a special virtual display that allows for PyAutoGUI actions. How can i enable that virtual display so that my code will work properly in headless mode?
I expect that the code will run in headless mode, and that sb.uc_gui_handle_captcha() can bypass the CAPTCHA with headless mode.