SeleniumBase icon indicating copy to clipboard operation
SeleniumBase copied to clipboard

Cloudflare captcha bypass doesn't work for lockr.so

Open notArTeM opened this issue 1 year ago • 2 comments

async def lockr_bypass(url: str) -> str: print(f'Trying to bypass {url}... (lockr_bypass)')

with SB(uc=True) as sb:
    sb.driver.get(url)
    sb.driver.implicitly_wait(15)

    bypassed_urls.append(url)

    main_window = sb.driver.current_window_handle

    title = sb.driver.title
    print(f'Lockr web title: {title}')
    if "just a moment" in title.lower() or "зачекайте хвильку" in title.lower():
        try:
            sb.uc_gui_click_captcha()
            print("CAPTCHA clicked")
            time.sleep(5)
        except Exception as e:
            print(f"Failed to click CAPTCHA: {e}")
            return None

it says CAPTCHA clicked but the captcha isn't clicked

notArTeM avatar Jul 06 '25 19:07 notArTeM

You have to follow the instructions in the CDP Mode docs. And you should see the CDP Mode examples in SeleniumBase/examples/cdp_mode. Your code should look something like this:

from seleniumbase import SB

with SB(uc=True, test=True) as sb:
    url = "lockr.so"
    sb.activate_cdp_mode(url)
    sb.sleep(2)
    sb.uc_gui_click_captcha()
    sb.sleep(3)

mdmintz avatar Jul 07 '25 02:07 mdmintz

Even with the correct CDP mode usage, some Cloudflare implementations on sites like lockr.so are checking more than just the click behavior. Things like canvas hash, AudioContext, and hardware concurrency all feed into the trust score. I had similar issues until I stopped using a patched driver and switched to a Chromium build that has fewer of those signals baked in at the source level. The click itself works fine after that. Worth checking stealthbrowser.org if you're still hitting walls — I actually use JS to customize the fingerprint on top of their base build since I didn't want to pay for each profile, not as clean as their native implementation but gets the job done.

gexiea avatar Mar 11 '26 07:03 gexiea