import requests
from twocaptcha import TwoCaptcha
solver = TwoCaptcha('2capctha api key')
def post():
data = {
'g-recaptcha-response': captcha
}
response = requests.post('siteurl', data=data)
return response
def captcha():
result = solver.recaptcha(sitekey='Sitenin captcha key'i',url='site url' )
return result
try:
captchaKey = captcha()
except ApiException as e:
# api respond with error
solver.report(captchaKey['captchaId'], False)
print('Hataya dustu ve bildirildi')
print("Captcha ID : ", str(captchaKey['captchaId']))
except TimeoutException as e:
# captcha is not solved so far
solver.report(captchaKey['captchaId'], False)
print('Hataya dustu ve bildirildi')
print("Captcha ID : ", str(captchaKey['captchaId']))kod çalışır halde değil ama bu tarz bir kullanımı var. işi alacak python bilen arkadaşlara kolay gelsin
edit: 2captcha bence çok kötü içeride param olduğu halde kullanmıyorum anti-captcha bot ile çözdürüyor ve başarılı çok daha hızlı.