UNLOCK API

API para sa pag-solve ng Cloudflare Challenge page

Magpadala ng Cloudflare Challenge page task sa API at matatanggap mo ang sagot na isusumite ng code mo sa page. URL ng challenge page, ang user agent mo at isang proxy. Matatanggap mo: Isang cf_clearance cookie.

Sa madaling salita

Presyo bawat 1,000
$0.725 ($0.000725 bawat task)
createTask type
AntiCloudflareTask
in.php method
cloudflare_challenge
Ipapadala mo
URL ng challenge page, ang user agent mo at isang proxy
Matatanggap mo
Isang cf_clearance cookie

Saan makikita ang mga value

Ang challenge page ay ang buong-page na Cloudflare check. Gumagana lang ang cookie sa parehong proxy IP at user agent na ipinadala mo.

createTask at getTaskResult

Gawin ang task, maghintay ng mga 5 segundo, saka i-check ang resulta bawat 5 segundo hanggang ready na ang status. Kung mag-fail ang task, magbabalik ang API ng error at babalik ang singil sa balance mo.

import time, requests

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

task = requests.post(f"{API}/createTask", json={
    "clientKey": KEY,
    "task": {
      "type": "AntiCloudflareTask",
      "websiteURL": "https://example.com/login",
      "userAgent": "Mozilla/5.0 ...",
      "proxyType": "http",
      "proxyAddress": "1.2.3.4",
      "proxyPort": 8080
    }
}).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")

Kumpletong API reference: bawat parameter at ang solution object