Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

562
Visualizações
H-Captcha, can't fill the token in h-captcha-response innerHTML and g-recaptcha-response innerHTML

I'm trying to bypass a Hcaptcha with 2captcha thank to selenium and 2captcha in python.

When I receive my 2captcha token, I try to fill my token in both textareas named 'h-captcha-response' and 'g-captcha-response'

But it doesn't work.

Both textareas have ids with the pattern "h-captacha-[ID]" and "g-recaptacha-[ID]"

My problem is : As soon as I want to fill the innerHTML of the textareas, it returns me an error because I can't get the 2 items correctly

driver.execute_script('''                                                                                                                                                   
     let [captcha] = arguments[document.querySelectorAll('[name="h-captcha-response"], 
     [name="g-recaptcha-response"]')].map(el => {                                                          
     el.innerHTML = captcha})''', code)

Do you know why my driver.execute_script command doesn't work ? Code is the good token for the captcha, i need to send it in the 2 textareas.

Here is the error

selenium.common.exceptions.JavascriptException: Message: javascript error: Cannot read properties of undefined (reading 'map')

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda