Skip to main content

CaptchaRun Official Python SDK

Project description

CaptchaRun Python SDK

Github Action Test Codecov

PyPI

CapthcaRun 官方 Python 客户端


例子

查询余额

from captcharun import Client, GetBalance, CreateTask
client = Client("你的 TOKEN")
result = client.invoke(GetBalance())

print(result)
# {'cumulativeRecharge': '1100', 'share': '0.0960', 'balance': '103.508', 'credit': '0', 'cumulativeShare': '0.0960'}

创建任务 & 获取状态

from captcharun import Client, GetBalance, GetTask, CreateTask
from captcharun.task import ReCaptchaV2Task

client = Client("你的 TOKEN")

# 创建任务
result = client.invoke(
    CreateTask(
        ReCaptchaV2Task(
            "SITE KEY",
            "SITE REFERER",
        ),
        developer="开发者 ID"
    ),
)
print(result) 
# {'taskId': '492ca979-7559-4012-ac31-3134b9ce63f8'}

# 获取任务状态 (异步返回)
result = client.invoke(GetTask(result['taskId']))
print(result)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

captcharun-0.2.3.tar.gz (7.7 kB view hashes)

Uploaded Source

Built Distribution

captcharun-0.2.3-py3-none-any.whl (8.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page