[Python] How to bypass hCaptcha when automating a website login using Selenium in Python?

Discussão em 'Python' iniciado por Stack, Março 12, 2025.

  1. Stack

    Stack Membro Participativo

    I'm working on a Python Selenium automation to access the Brazilian website for MEI DAS payments so i can download them automatically. However, I encountered an issue where the website is protected by hCaptcha and blocks my bot with the following error:

    "13896 - Prevented by hCaptcha protection. Robot behavior."

    Here’s what I’ve tried so far:

    ✅ Disabling Selenium detection:

    options = webdriver.ChromeOptions()
    options.add_argument("--disable-blink-features=AutomationControlled")
    navegador = webdriver.Chrome(options=options)


    ✅ Humanizing interactions: -Adding random delays between actions. -Using ActionChains to move the mouse before clicking. -Simulating scrolling before interacting with elements.

    Nothing worked.

    Continue reading...

Compartilhe esta Página