Package: python3-anticaptcha
python3-anticaptchaPython 3.6+ library forAnti-Captchaservice.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? Как установить?pippipinstallpython3-anticaptchaSourcegitclonehttps://github.com/AndreiDrang/python3-anticaptcha.gitcdpython3-anticaptcha
pythonsetup.pyinstallПо всем вопросам можете писать вTelegramчат.With any questions, please contact us inTelegram.Присутствуютпримеры работы с библиотекой.Full examples you can findhere.At the moment the following methods are implemented:На данный момент реализованы следующие методы:0.Manual result handler.frompython3_anticaptchaimportCustomResultHandler# Enter the key to the AntiCaptcha service from your account. Anticaptcha service key.ANTICAPTCHA_KEY="your_key"# Task ID to get resultTASK_ID=123456# This module is used to obtain the result of solving the task in "manual" modecustom_result=CustomResultHandler.CustomResultHandler(anticaptcha_key=ANTICAPTCHA_KEY)user_answer=custom_result.task_handler(task_id=TASK_ID)print(user_answer)1.Image to text captcha.frompython3_anticaptchaimportImageToTextTask# Enter the key to the AntiCaptcha service from your account. Anticaptcha service key.ANTICAPTCHA_KEY=""# Link to captcha image.image_link="https://pythoncaptcha.tech/static/image/common_image_example/800070.png"# Get string for solve captcha, and some other info.user_answer=ImageToTextTask.ImageToTextTask(anticaptcha_key=ANTICAPTCHA_KEY).\captcha_handler(captcha_link=image_link)print(user_answer)2.ReCaptcha v2.3.ReCaptcha v2 Proxyless.+Selenium examplefrompython3_anticaptchaimportNoCaptchaTaskProxyless# Enter the key to the AntiCaptcha service from your account. Anticaptcha service key.ANTICAPTCHA_KEY=""# G-ReCaptcha ключ сайта. Website google key.SITE_KEY='6LeuMjIUAAAAAODtAglF13UiJys0y05EjZugej6b'# Page url.PAGE_URL='https://www.google.com/recaptcha/intro/android.html'# Get string for solve captcha, and other info.user_answer=NoCaptchaTaskProxyless.NoCaptchaTaskProxyless(anticaptcha_key=ANTICAPTCHA_KEY)\.captcha_handler(websiteURL=PAGE_URL,websiteKey=SITE_KEY)print(user_answer)4.ReCaptcha v3 Proxyless.frompython3_anticaptchaimportReCaptchaV3TaskProxyless# Enter the key to the AntiCaptcha service from your account. Anticaptcha service key.ANTICAPTCHA_KEY=""# G-ReCaptcha - website google key.SITE_KEY='6LeuMjIUAAAAAODtAglF13UiJys0y05EjZugej6b'# Page url.PAGE_URL='https://some_link'# The filter by which the employee with the required minimum score is selected.# possible options - 0.3, 0.5, 0.7MIN_SCORE=0.3# The value of the `action` parameter, which is passed by the recaptcha widget to google.PAGE_ACTION='login'# Get string for solve captcha, and other info.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)5.Fun Captcha.6.Fun Captcha Proxyless.frompython3_anticaptchaimportFunCaptchaTask# Enter the key to the AntiCaptcha service from your account. Anticaptcha service key.ANTICAPTCHA_KEY=""# G-ReCaptcha site keySITE_KEY=''# Link to the page with captchaPAGE_URL=''# Get full data for solve captcha.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)7.Account management module.frompython3_anticaptchaimportAntiCaptchaControl# Enter the key to the AntiCaptcha service from your account. Anticaptcha service key.ANTICAPTCHA_KEY=""# Balance inforesult=AntiCaptchaControl.AntiCaptchaControl(anticaptcha_key=ANTICAPTCHA_KEY).get_balance()# Submitting a complaint about incorrectly resolved captcha imagesresult=AntiCaptchaControl.AntiCaptchaControl(anticaptcha_key=ANTICAPTCHA_KEY).complaint_on_result(reported_id=543212,captcha_type="image")# Submitting a complaint about incorrectly resolved ReCaptcharesult=AntiCaptchaControl.AntiCaptchaControl(anticaptcha_key=ANTICAPTCHA_KEY).complaint_on_result(reported_id=5432134,captcha_type="recaptcha")# Giving information about loading the queue, depending on the queue IDresult=AntiCaptchaControl.AntiCaptchaControl(anticaptcha_key=ANTICAPTCHA_KEY).get_queue_status(queue_id=1)8.Custom Captcha.frompython3_anticaptchaimportCustomCaptchaTask# Enter the key to the AntiCaptcha service from your account. Anticaptcha service key.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)9.Gee Test.10.Gee Test Proxyless.frompython3_anticaptchaimportGeeTestTaskProxyless# Enter the key to the AntiCaptcha service from your account. Anticaptcha service key.ANTICAPTCHA_KEY=""# обязательные параметрыwebsiteURL="http:\/\/mywebsite.com\/geetest\/test.php"gt="874703612e5cac182812a00e273aad0d"challenge="a559b82bca2c500101a1c8a4f4204742"# пример работы с GeeTestTask без проксиresult=GeeTestTaskProxyless.GeeTestTaskProxyless(anticaptcha_key=ANTICAPTCHA_KEY,websiteURL=websiteURL,gt=gt).\captcha_handler(challenge=challenge)print(result)11.HCaptcha.12.HCaptcha Proxyless.frompython3_anticaptchaimportHCaptchaTaskProxyless# Enter the key to the AntiCaptcha service from your account. Anticaptcha service key.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 ourweb-site.For tests:Clon repo;exportanticaptcha_key=SERVICE_KEYmaketest