UNLOCK API

Lemin Cropped Captcha 識別 API

向 API 發送 Lemin Cropped Captcha 任務,取回你的代碼要提交到頁面的答案。頁面網址、captcha id,以及載有組件的 div 的 id。你會收到:答案及 challenge id 值。

概覽

每 1,000 次價格
$0.725 (每個任務 $0.000725)
createTask 類型
LeminTaskProxyless, LeminTask
in.php 方法
lemin
你需提供
頁面網址、captcha id,以及載有組件的 div 的 id
你會收到
答案及 challenge id 值

在哪裏找到這些數值

captchaId 以 CROPPED_ 開頭,位於 Lemin 腳本的地址中。divId 是包含組件的元素的 id。

createTask 和 getTaskResult

建立任務,等候約 5 秒,然後每 5 秒查詢一次結果,直至狀態為 ready。如任務失敗,API 會回傳錯誤,費用退回你的餘額。

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

以傳統表單 API 發送同一任務。加上 json=1 可取得 JSON 回覆;否則回覆為純文字,例如 OK|1001。

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 參考:所有參數和 solution 物件