github seleniumbase/SeleniumBase v4.41.9
4.41.9 - CDP Mode: Patch 57

11 hours ago

CDP Mode: Patch 57

One of the key improvements is being able to click through multiple CAPTCHAs at nearly the same time.
See the following example: SeleniumBase/examples/cdp_mode/raw_multi_captcha.py, which spins up multiple windows via ThreadPoolExecutor, and then solves mutliple CAPTCHAs.

from concurrent.futures import ThreadPoolExecutor
from random import randint
from seleniumbase import decorators
from seleniumbase import sb_cdp

def main(url):
    sb = sb_cdp.Chrome(url, lang="en")
    sb.set_window_rect(randint(4, 680), randint(8, 380), 840, 520)
    sb.sleep(2.2)
    sb.gui_click_captcha()
    sb.sleep(2)
    sb.driver.quit()

if __name__ == "__main__":
    urls = ["https://seleniumbase.io/apps/turnstile" for i in range(5)]
    with decorators.print_runtime("raw_multi_captcha.py"):
        with ThreadPoolExecutor(max_workers=len(urls)) as executor:
            for url in urls:
                executor.submit(main, url)

What's Changed

Full Changelog: v4.41.8...v4.41.9

Don't miss a new SeleniumBase release

NewReleases is sending notifications on new releases.