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()