1

I am using anti-captcha trying to bypass this url https://www.ebay.com/splashui/captcha?ap=1&appName=orch&ru=https%3A%2F%2Fwww.ebay.com%2Fsch%2Fi.html%3F_from%3DR40%26_nkw%3DLogitech%2Bg502%2Bhero%26_sacat%3D0%26LH_ItemCondition%3D3000%26rt%3Dnc%26LH_Sold%3D1%26LH_Complete%3D1&iid=6bf04aac-5c16-4067-9db2-ff4660df014c.

I can receive the response of the captcha and insert into g-recaptcha-response after making it visible without issue but when I try to submit the element nothing happens.

Here is my code (just assume the driver is already setup correctly on this url):

captcha_data = driver.find_element_by_id("s0-66-captcha-data").get_attribute("value")
captcha_data = eval(captcha_data)

site_key = captcha_data.get('siteKey')

captcha_url = driver.current_url


solver = recaptchaV2Proxyless()
solver.set_verbose(1)
solver.set_key(anti_captcha_key)
solver.set_website_url(captcha_url)
solver.set_website_key(site_key)

driver.execute_script(
    "arguments[0].style.display='inline'",
    driver.find_element_by_xpath(
        '//*[@id="g-recaptcha-response"]'
    ),
)

g_response = solver.solve_and_return_solution()
if g_response != 0:
    print ("g-response: "+g_response)
else:
    print ("task finished with error "+solver.error_code)


driver.execute_script(
'document.getElementById("g-recaptcha-response").innerHTML = "%s"'
            % g_response
)

   

driver.find_element_by_id("g-recaptcha-response").submit()
weston6142
  • 181
  • 14
  • That's a textarea. You want to submit the form. – pguardiario May 26 '21 at 01:56
  • I submitted this form `
    ` using `driver.find_element_by_id("captcha_form").submit()` and I still got the same result.
    – weston6142 May 26 '21 at 22:25
  • I also tried executing the callback function using `driver.execute_script("captchaCallback(\"" + g_response + "\")")` before submitting the form and still no luck. – weston6142 May 26 '21 at 23:29
  • check the console for js errors. – pguardiario May 27 '21 at 01:28
  • @pguardiario Currently I want to click submit button. But I can't find submit button, can see g-recaptcha-response. https://www.tixr.com/groups/beakandskiff/events/rainbow-kitten-surprise-60724 (click vip experience, increase amount and checkout, if you can meet recaptcha in the site) – GlistenSTAR Mar 27 '23 at 16:56
  • you can try submit the form: `el.closest('form').submit()` – pguardiario Mar 27 '23 at 23:39

0 Answers0