Skip to content

EzCaptcha SDK for python, solve ReCaptcha, FunCaptcha and other captcha

License

Notifications You must be signed in to change notification settings

ez-captcha/ezcaptcha-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

English | 中文版

English

EzCaptcha official python SDK, we can solve recaptcha, funcaptcha and other captcha, check our official website: EzCaptcha

Install

pip install ezcaptcha

Usage

Sample:

from ezcaptcha import EzCaptcha

# Solve Recaptcha
ez = EzCaptcha(client_key="yourapiKey")
solution = ez.solve({
    "websiteURL": "https://www.google.com/recaptcha/api2/demo",
    "websiteKey": "6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-",
    "type": ez.AllTaskType.RecaptchaV2TaskProxyless,  # or use str "RecaptchaV2TaskProxyless"
    "isInvisible": False
}, print_log=True)
if solution.get("errorId") == 0:
    # Get captcha token result
    captcha_token = solution.get("token")
    print(captcha_token)
else:
    print(solution.get("errorDesc"))

# Solve Funcaptcha
solution = ez.solve({
  "websiteURL": "https://iframe.arkoselabs.com",
  "websiteKey": "B7D8911C-5CC8-A9A3-35B0-554ACEE604DA",
  "type": ez.AllTaskType.FuncaptchaTaskProxyless,  # or use str "FuncaptchaTaskProxyless"
}, print_log=True)

Specify the language of log output and prompts, support "en" and "zh", default "en"

from ezcaptcha import EzCaptcha

ez = EzCaptcha(client_key="yourapiKey", lang="zh")
...

Enable log printing function

from ezcaptcha import EzCaptcha

ez = EzCaptcha(client_key="yourapiKey")
solution = ez.solve({
    "websiteURL": "https://www.google.com/recaptcha/api2/demo",
    "websiteKey": "6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-",
    "type": "RecaptchaV2TaskProxyless",
    "isInvisible": False,
}, print_log=True)

Specific waiting_interval(default 3s) and waiting_timeout(default 120s)

from ezcaptcha import EzCaptcha

ez = EzCaptcha(client_key="yourapiKey")
solution = ez.solve({
    "websiteURL": "https://www.google.com/recaptcha/api2/demo",
    "websiteKey": "6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-",
    "type": "RecaptchaV2TaskProxyless",
    "isInvisible": False,
}, waiting_interval=1, waiting_timeout=90, print_log=True)

Releases

No releases published

Packages

No packages published

Languages