I'm trying to solve a reCaptcha pje.trt6.jus.br/certidoes/trabalhista/emissao.
I've already read this post and used this code and they heleped me to in handle the reCaptcha others websites , however I can't solve the reCapatcha in this site pje.trt6.jus.br/certidoes/trabalhista/emissao.
I've followed every steps, found out the callback function and put the response on it, but it returned invalid reCaptcha.
This is the response that I receive:
And here is the error in console:
Here is the callback function:
Here is a snippet of my code:
Please, someone can help me to solve this reCaptcha from hell.
I've already read this post and used this code and they heleped me to in handle the reCaptcha others websites , however I can't solve the reCapatcha in this site pje.trt6.jus.br/certidoes/trabalhista/emissao.
I've followed every steps, found out the callback function and put the response on it, but it returned invalid reCaptcha.
This is the response that I receive:
And here is the error in console:
JavaScript:
ERROR
{…}
error: Object { identificadorRequisicao: "10355f97-7272-4cc1-ac86-d0e03540c8c1", codigoErro: "CER-017", mensagem: "Unexpected error invalid-input-response when checking CAPTCHA" }
headers: Object { normalizedNames: Map(15), lazyUpdate: null, lazyInit: null, … }
message: "Http failure response for https://pje.trt6.jus.br/pje-certidoes-api/api/certidoes/trabalhistas/emissao: 500 Internal Server Error"
name: "HttpErrorResponse"
ok: false
status: 500
statusText: "Internal Server Error"
url: "https://pje.trt6.jus.br/pje-certidoes-api/api/certidoes/trabalhistas/emissao"
<prototype>: {…
Here is the callback function:
Here is a snippet of my code:
Python:
def solve_recaptcha(site):
solver = TwoCaptcha('***')
g_recaptcha = solver.recaptcha(sitekey='6LdiJtkUAAAAAIKaob0HxASzZKlfsZxt5QQE7gxn', url=site)
print(g_recaptcha)
return g_recaptcha['code']
def crawler():
site = 'https://pje.trt6.jus.br/certidoes/trabalhista/emissao'
g_response = solve_recaptcha(site)
driver.execute_script("""document.getElementById("g-recaptcha-response").innerHTML = arguments[0]""", g_response)
driver.execute_script("""___grecaptcha_cfg.clients[0].l.l.callback("{}")""", g_response)
WebDriverWait(driver, 5).until(EC.element_to_be_clickable((By.XPATH, "//span[contains(text(), 'Emitir')]"))).click()
Please, someone can help me to solve this reCaptcha from hell.
Last edited by a moderator: