I am trying to colve cloudflare turnstile captcha which is on website https://visa.vfsglobal.com/ind/en/pol/login using python selenium with 2captcha api.
i have used same method the 2captcha showed on their website but i am wondering why its not sloving in my case. 2captcha solution example is here https://2captcha.com/demo/cloudflare-turnstile on their website. i think in my case the website is more secured thats why its not easily sovable.
kindly have a look and lemme know either this is something possible or not. thanks
what i tried here is code.
bot.maximize_window()
time.sleep(40)
bot.find_element(By.ID, 'mat-input-0').send_keys('Appointment.004slots@gmail.com')
time.sleep(5)
bot.find_element(By.ID, 'mat-input-1').send_keys('Umar@1234')
site_key = "0x4AAAAAAACYaM3U_Dz-4DN1"
result = cloudflare_turnstile.getCode(bot.current_url, site_key)
print("Result : ", result['code'])
bot.execute_script("document.getElementsByName('cf-turnstile-response')[0].value= " + "'" + result['code'] + "'"
)
time.sleep(5)
bot.find_element(By.XPATH, "//button/span[contains(text(),' Sign In')]").click()
2captcha solver code is below
from twocaptcha import TwoCaptcha
solver = TwoCaptcha('api key')
def getCode(url, data_siteKey):
try:
result = solver.turnstile(
sitekey=data_siteKey,
url=url
)``your text``
except Exception as e:
print(e)
exit()
return result```