[Python] How to use undetected-chromedriver and mitmproxy without triggering Akamai GHost?

Discussão em 'Python' iniciado por Stack, Maio 24, 2025.

  1. Stack

    Stack Membro Participativo

    I made a Python app that prompts a Chrome page (using selenium and undetected-chromedriver) to the user, with a login page. Once the user manually logs in, the app intercepts some requests and responses (using mitmproxy), sends some other requests (using requests), and stores the responses for later use in the app, then closes the driver.

    Doing some tests, I confirmed that mitmproxy is causing the issue: if I do not connect undetected-chromedriver to the proxy it lets me do the login, but I cannot intercept the requests anymore so it's useless.

    Until yesterday, everything worked just fine. Today when I try to login I get blocked by Akamai GHost. The strange thing is it still works on MacOS, just stopped working on Windows.

    What I already tried to avoid using mitmproxy:

    1. Using selenium-wire's own undetected-chromedriver, and use driver.requests to handle requests: triggers Akamai GHost (I guess because selenium-wire is not maintained since a couple years)
    2. Setting up the desired capabilities for undetected-chromedriver, and use driver.get_log("performance") to handle requests: code error (The desired capabilities thing does not work with uc)
    3. Doing 2. but with selenium's own webdriver instead of uc: triggers Akamai GHost (normal webdriver is not undetected)

    Continue reading...

Compartilhe esta Página