Official anti-captcha.com library
Project description
anticaptchaofficial
Official https://anti-captcha.com/ library for solving images with text, Recaptcha v2/v3 Enterprise or non-Enterprise, Funcaptcha Arcoselabs, GeeTest and hCaptcha Enterprise or non-Enterprise. Anti-Captcha is the most popular and reliable captcha solving service, working since 2007. Prices for solving captchas start from $0.0005 per item.
Python 3:
pip3 install anticaptchaofficial
Python 2 not supported.
Example how to create Recaptcha V2 task and receive g-response:
from anticaptchaofficial.recaptchav2proxyless import *
solver = recaptchaV2Proxyless()
solver.set_verbose(1)
solver.set_key("YOUR_API_KEY")
solver.set_website_url("https://website.com")
solver.set_website_key("SITE_KEY")
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
Report previosly solved Recaptcha V2/V3/Enterprise as incorrect:
solver.report_incorrect_recaptcha()
Report it as correct to improve your quality:
solver.report_correct_recaptcha()
Solve image captcha:
from anticaptchaofficial.imagecaptcha import *
solver = imagecaptcha()
solver.set_verbose(1)
solver.set_key("YOUR_KEY")
captcha_text = solver.solve_and_return_solution("captcha.jpeg")
if captcha_text != 0:
print("captcha text "+captcha_text)
else:
print("task finished with error "+solver.error_code)
Report previosly solved image captcha as incorrect:
solver.report_incorrect_image_captcha()
Solve Funcaptcha (Arkoselabs):
from anticaptchaofficial.funcaptchaproxyless import *
solver = funcaptchaProxyless()
solver.set_verbose(1)
solver.set_key("YOUR_KEY")
solver.set_website_url("https://website.com")
solver.set_website_key("XXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXX")
token = solver.solve_and_return_solution()
if token != 0:
print("result token: "+token)
else:
print("task finished with error "+solver.error_code)
Solve GeeTest captcha:
from anticaptchaofficial.geetestproxyless import *
solver = geetestProxyless()
solver.set_verbose(1)
solver.set_key("YOUR_API_KEY")
solver.set_website_url("https://address.com")
solver.set_gt_key("CONSTANT_GT_KEY")
solver.set_challenge_key("VARIABLE_CHALLENGE_KEY")
token = solver.solve_and_return_solution()
if token != 0:
print("result tokens: ")
print(token)
else:
print("task finished with error "+solver.error_code)
Solve GeeTest v4 captcha:
from anticaptchaofficial.geetestproxyless import *
solver = geetestProxyless()
solver.set_verbose(1)
solver.set_key("YOUR_API_KEY")
solver.set_website_url("https://address.com")
solver.set_version(4)
solver.set_init_parameters({"riskType": "slide"})
token = solver.solve_and_return_solution()
if token != 0:
print("result tokens: ")
print(token)
else:
print("task finished with error "+solver.error_code)
Solve HCaptcha:
from anticaptchaofficial.hcaptchaproxyless import *
solver = hCaptchaProxyless()
solver.set_verbose(1)
solver.set_key("YOUR_KEY")
solver.set_website_url("https://website.com")
solver.set_website_key("SITE_KEY")
solver.set_user_agent("YOUR FULL USER AGENT HERE")
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)
Solve HCaptcha Enterprise:
from anticaptchaofficial.hcaptchaproxyless import *
solver = hCaptchaProxyless()
solver.set_verbose(1)
solver.set_key("YOUR_KEY")
solver.set_website_url("https://website.com")
solver.set_website_key("SITE_KEY")
solver.set_user_agent("YOUR FULL USER AGENT HERE")
# set here parameters like rqdata, sentry, apiEndpoint, endpoint, reportapi, assethost, imghost
solver.set_enterprise_payload({
"rqdata": "rq data value from target website",
"sentry": True
})
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)
Solve AntiGate task:
from anticaptchaofficial.antigatetask import *
solver = antigateTask()
solver.set_verbose(1)
solver.set_key("YOUR_KEY")
solver.set_website_url("http://antigate.com/logintest.php")
solver.set_template_name("Sign-in and wait for control text")
solver.set_variables({
"login_input_css": "#login",
"login_input_value": "test login",
"password_input_css": "#password",
"password_input_value": "test password",
"control_text": "You have been logged successfully"
})
result = solver.solve_and_return_solution()
if result != 0:
cookies, localStorage, fingerprint, url, domain = result["cookies"], result["localStorage"], result["fingerprint"], result["url"], result["domain"]
print("cookies: ", cookies)
print("localStorage: ", localStorage)
print("fingerprint: ", fingerprint)
print("url: "+url)
print("domain: "+domain)
else:
print("task finished with error "+solver.error_code)
Check out examples for other captcha types
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Hashes for anticaptchaofficial-1.0.37-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 15118bb69fc05d08160220c74d5aef509d3de6e61ef4d09e1f56fcb06eb91d3e |
|
MD5 | 12766ed3c49dd87a1e66d2e24b89be1d |
|
BLAKE2b-256 | 22c2b7050ed54552d4b1dc3424a2187dab39953db9e54866111f2cbccfa16075 |