UNLOCK API
Lemin Cropped Captcha

Lemin Cropped Captcha

如何通过 createTask 或 in.php 向 UNLOCK API 发送 Lemin Cropped Captcha 任务:任务类型名称、全部参数、solution 对象、代理字段,以及 7 种语言的代码示例。
价格
$0.725 每个任务 $0.000725
你发送
页面网址、captcha id,以及包含组件的 div 的 id
你得到
answer 和 challenge id 值

简介和价格

任务类型名称

不使用代理时用第一个名称。要通过你自己的代理识别,用第二个名称并加上代理字段。价格相同。
LeminTaskProxyless不使用代理
LeminTask使用你的代理

task 对象

type
String必填
任务类型名称。不区分大小写。 LeminTaskProxyless | LeminTask
websiteURL
String必填
出现验证码的页面完整地址,以 http:// 或 https:// 开头。
captchaId
String必填
Lemin 脚本中的 captcha_id,以 CROPPED_ 开头。
divId
String必填
包含 Lemin 组件的 div 的 id。
leminApiServerSubdomain
String可选
Lemin API 服务器(如果页面使用自己的服务器)。
userAgent
String可选
识别时使用的浏览器 User-Agent。提交答案时请使用相同的值。

此处未列出的字段会原样传给识别方。

代理字段

仅用于代理类型名称。可以分别发送各字段,也可以发送一个 proxy 字符串。
proxyType
String必填
http、https、socks4 或 socks5。
proxyAddress
String必填
代理 IP 地址或主机名。
proxyPort
Integer必填
代理端口。
proxyLogin
String可选
代理用户名(如果代理需要)。
proxyPassword
String可选
代理密码(如果代理需要)。
proxy
String
把所有代理字段写成一个字符串,例如 http://user:pass@1.2.3.4:8080。

使用代理

请求

POST /createTask
{
  "clientKey": "YOUR_API_KEY",
  "task": {
    "type": "LeminTaskProxyless",
    "websiteURL": "https://example.com/login",
    "captchaId": "CROPPED_3dfdd5c_d1872b526b794d83ba3b365eb15a200b",
    "divId": "lemin-cropped-captcha"
  }
}

solution 对象

status 为 ready 时在 solution 中返回。
answer
String
要提交的答案。
challenge_id
String
随答案提交的 Lemin challenge id。
POST /getTaskResult
{
  "errorId": 0,
  "taskId": 1001,
  "status": "ready",
  "solution": {
    "answer": "0xaxakx0xaxaax0xkxx3ox0x3ox3ox...",
    "challenge_id": "e0348984-92ec-4b7f-9a4e-3b8e1f0c2d6a"
  },
  "cost": "0.000725",
  "createTime": 1791640000,
  "endTime": 1791640014,
  "solveCount": 1
}

代码示例

import time, requests

API = "https://unlock-api.com"
KEY = "YOUR_API_KEY"

task = requests.post(f"{API}/createTask", json={
    "clientKey": KEY,
    "task": {
      "type": "LeminTaskProxyless",
      "websiteURL": "https://example.com/login",
      "captchaId": "CROPPED_3dfdd5c_d1872b526b794d83ba3b365eb15a200b",
      "divId": "lemin-cropped-captcha"
    }
}).json()
if task["errorId"]:
    raise SystemExit(task["errorCode"])

for _ in range(60):   # 60 x 5 s = the 5 minute task limit
    time.sleep(5)
    r = requests.post(f"{API}/getTaskResult", json={"clientKey": KEY, "taskId": task["taskId"]}).json()
    if r["errorId"]:
        raise SystemExit(f"{r['errorCode']}: {r.get('errorDescription', '')}")   # failed tasks are refunded
    if r["status"] == "ready":
        print(r["solution"])
        break
else:
    raise SystemExit("timed out")

in.php 表单方法

用传统表单请求发送同一任务。res.php 以文本形式返回答案。
in.php, res.php
curl -s "https://unlock-api.com/in.php" -d "key=YOUR_API_KEY&method=lemin&captcha_id=CROPPED_ID&div_id=lemin-cropped-captcha&pageurl=https://example.com/login&json=1"
# {"status":1,"request":"1001"}

curl -s "https://unlock-api.com/res.php?key=YOUR_API_KEY&action=get&id=1001&json=1"
# {"status":0,"request":"CAPCHA_NOT_READY"}  then  {"status":1,"request":"ANSWER"}

表单 API:in.php 和 res.php