Menu

ImageToTextTask:破解图片人机验证谜题

公开提供图片主体,然后会收到其中的文本。文本仅可包含数字、字母、特殊字符和空格。GIF 动画受支持,最大 500kb。“在这些图片中找到猫,然后输入其编号”之类的自定义人机验证谜题不受支持。

任务对象

属性类型必须使用默认值用途
type字符串ImageToTextTask指定任务类型。
body字符串文件主体以 base64 方式编码。一定要在没有换行符的情况下发送文件主体。不要包括“data:image/png”或类似的标记,仅使用纯净的 base64 格式!
phrase布尔值false
case布尔值true
numeric整数0
math布尔值false
minLength整数0
maxLength整数0
comment字符串为工人提供 "输入红色文本 "等附加注释。结果无法保证,完全由工人自己决定。
websiteURL字符串自愿使用的参数,用于在支出统计数据中区分图片人机验证谜题来源。

请求示例

Python
Javascript
PHP
Java
C#
bash
#pip3 install anticaptchaofficial

from anticaptchaofficial.imagecaptcha import *

solver = imagecaptcha()
solver.set_verbose(1)
solver.set_key("YOUR_API_KEY_HERE")

# Specify softId to earn 10% commission with your app.
# Get your softId here: https://anti-captcha.com/clients/tools/devcenter
solver.set_soft_id(0)

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

任务破解结果对象

属性类型用途
text字符串图片人机验证谜题中的文本
url字符串人机验证谜题网址,我们将在未来的 24 小时内从中存储人机验证谜题。这段时间过后会将其删除。

回应示例

{
    "errorId":0,
    "status":"ready",
    "solution":
    {
        "text":"deditur",
        "url":"http://61.39.233.233/1/147220556452507.jpg"
    },
    "cost":"0.000700",
    "ip":"46.98.54.221",
    "createTime":1472205564,
    "endTime":1472205570,
    "solveCount":"0"
}