[Python] ERROR_BAD_PARAMETERS with 2Captcha while trying to solve FunCaptcha on LinkedIn

Discussão em 'Python' iniciado por Stack, Abril 29, 2025.

  1. Stack

    Stack Membro Participativo

    I'm trying to solve the Arkose FunCaptcha on LinkedIn with 2Captcha. I'm using Selenium, and here's my Python code.

    try:
    captcha = self.driver.find_element(By.XPATH, "//input[@name='captchaSiteKey']")
    iframe = self.driver.find_element(By.XPATH, '//iframe')

    site_key = captcha.get_attribute('value')
    url = iframe.get_attribute('src')

    print(f"Solving captcha for site key: {site_key}")
    print(f"URL: {url}")

    result = self.solver.funcaptcha(site_key, url)
    if result.get('code') == 0:
    token = result.get('token')
    self.driver.execute_script(
    f"document.querySelector('input[name=\"fc-token\"]').value = '{token}';"
    )
    except Exception as e:
    print(f"Error solving captcha: {str(e)}")
    finally:
    self.driver.switch_to.default_content()


    I successfully get a site key, and the URL is https://www.linkedin.com/checkpoint/challenge/funCaptchaInternal. However, I'm getting ERROR_BAD_PARAMETERS. Why is this happening?

    Continue reading...

Compartilhe esta Página