The thing is, when i use a different API, my requests work perfectly fine. But when using anti captcha it doesn't work at all.
def startCaptchaProccessAntiApi(public_key, page_url, blob,driver):
while True:
time.sleep(10)
solver = funcaptchaProxyless()
solver.set_verbose(1)
solver.set_key(APIKEY_ANTICAPTHCA)
solver.set_website_url(page_url)
solver.set_website_key(public_key)
solver.set_js_api_domain(API_DOMAIN)
solver.set_data_blob({"blob": blob})
solver.set_soft_id(0)
token = solver.solve_and_return_solution()
if token != 0:
print("result token: " + token)
break
else:
print("task finished with error " + solver.error_code)
This is how I get the Blob and the public key:
def startCaptchaProccess(driver, ver):
try:
time.sleep(5)
iframe = driver.find_element(By.TAG_NAME, "iframe")
captcha_url = iframe.get_attribute("src")
print("Captcha URL:", captcha_url)
if captcha_url and "publicKey=" in captcha_url:
publicKey = captcha_url.split("publicKey=")[1].split("&")[0]
Blob = captcha_url.split("dataExchangeBlob=")[1].split("&")[0]
print(f"Public key: {publicKey}")
print(f"Blob: {Blob}")