python3-anticaptcha
Python 3.6+ library for Anti-Captcha service.
Application in AppCenter.
Tested on UNIX based OS.
The library is intended for software developers and is used to work with the AntiCaptcha service API.
How to install? Как установить?
pip
pip install python3-anticaptcha
Source
git clone https://github.com/AndreiDrang/python3-anticaptcha.git
cd python3-anticaptcha
python setup.py install
По всем вопросам можете писать в Telegram чат.
With any questions, please contact us in Telegram.
Присутствуют примеры работы с библиотекой.
Full examples you can find here.
At the moment the following methods are implemented:
На данный момент реализованы следующие методы:
from python3_anticaptcha import CustomResultHandler
ANTICAPTCHA_KEY = "your_key"
TASK_ID = 123456
custom_result = CustomResultHandler.CustomResultHandler(
anticaptcha_key=ANTICAPTCHA_KEY
)
user_answer = custom_result.task_handler(task_id=TASK_ID)
print(user_answer)
from python3_anticaptcha import ImageToTextTask
ANTICAPTCHA_KEY = ""
image_link = "https://pythoncaptcha.tech/static/image/common_image_example/800070.png"
user_answer = ImageToTextTask.ImageToTextTask(anticaptcha_key = ANTICAPTCHA_KEY).\
captcha_handler(captcha_link=image_link)
print(user_answer)
from python3_anticaptcha import NoCaptchaTaskProxyless
ANTICAPTCHA_KEY = ""
SITE_KEY = '6LeuMjIUAAAAAODtAglF13UiJys0y05EjZugej6b'
PAGE_URL = 'https://www.google.com/recaptcha/intro/android.html'
user_answer = NoCaptchaTaskProxyless.NoCaptchaTaskProxyless(anticaptcha_key = ANTICAPTCHA_KEY)\
.captcha_handler(websiteURL=PAGE_URL,
websiteKey=SITE_KEY)
print(user_answer)
from python3_anticaptcha import ReCaptchaV3TaskProxyless
ANTICAPTCHA_KEY = ""
SITE_KEY = '6LeuMjIUAAAAAODtAglF13UiJys0y05EjZugej6b'
PAGE_URL = 'https://some_link'
MIN_SCORE=0.3
PAGE_ACTION='login'
user_answer = ReCaptchaV3TaskProxyless.ReCaptchaV3TaskProxyless(anticaptcha_key = ANTICAPTCHA_KEY)\
.captcha_handler(websiteURL=PAGE_URL,
websiteKey=SITE_KEY,
minScore=MIN_SCORE,
pageAction=PAGE_ACTION
)
print(user_answer)
from python3_anticaptcha import FunCaptchaTask
ANTICAPTCHA_KEY = ""
SITE_KEY = ''
PAGE_URL = ''
user_answer = FunCaptchaTask.FunCaptchaTask(anticaptcha_key=ANTICAPTCHA_KEY,
proxyType="http",
proxyAddress="8.8.8.8",
proxyPort=8080)\
.captcha_handler(websiteURL=PAGE_URL,
websitePublicKey=SITE_KEY)
print(user_answer)
from python3_anticaptcha import AntiCaptchaControl
ANTICAPTCHA_KEY = ""
result = AntiCaptchaControl.AntiCaptchaControl(anticaptcha_key = ANTICAPTCHA_KEY).get_balance()
result = AntiCaptchaControl.AntiCaptchaControl(anticaptcha_key = ANTICAPTCHA_KEY).complaint_on_result(
reported_id=543212, captcha_type="image"
)
result = AntiCaptchaControl.AntiCaptchaControl(anticaptcha_key = ANTICAPTCHA_KEY).complaint_on_result(
reported_id=5432134, captcha_type="recaptcha"
)
result = AntiCaptchaControl.AntiCaptchaControl(anticaptcha_key = ANTICAPTCHA_KEY).get_queue_status(queue_id=1)
from python3_anticaptcha import CustomCaptchaTask
ANTICAPTCHA_KEY = ""
imageUrl = "https://files.anti-captcha.com/26/41f/c23/7c50ff19.jpg"
my_custom_task = CustomCaptchaTask.CustomCaptchaTask(anticaptcha_key=ANTICAPTCHA_KEY).\
captcha_handler(imageUrl=imageUrl)
print(my_custom_task)
from python3_anticaptcha import GeeTestTaskProxyless
ANTICAPTCHA_KEY = ""
websiteURL = "http:\/\/mywebsite.com\/geetest\/test.php"
gt = "874703612e5cac182812a00e273aad0d"
challenge = "a559b82bca2c500101a1c8a4f4204742"
result = GeeTestTaskProxyless.GeeTestTaskProxyless(anticaptcha_key=ANTICAPTCHA_KEY,
websiteURL=websiteURL,
gt=gt).\
captcha_handler(challenge=challenge)
print(result)
from python3_anticaptcha import HCaptchaTaskProxyless
ANTICAPTCHA_KEY = ""
WEB_URL = "https://dashboard.hcaptcha.com/signup"
SITE_KEY = "00000000-0000-0000-0000-000000000000"
result = HCaptchaTaskProxyless.HCaptchaTaskProxyless(anticaptcha_key=ANTICAPTCHA_KEY).\
captcha_handler(websiteURL=WEB_URL, websiteKey=SITE_KEY)
print(result)
Кроме того, для тестирования различных типов капчи предоставляется специальный сайт, на котором собраны все имеющиеся типы капчи, с удобной системой тестирования ваших скриптов.
Some examples you can test with our web-site.
For tests:
- Clon repo;
-
export anticaptcha_key=SERVICE_KEY
make test