UNLOCK API
Tencent Captcha

Tencent Captcha

Paano magpadala ng Tencent Captcha task sa UNLOCK API gamit ang createTask o in.php: mga pangalan ng task type, bawat parameter, ang solution object, mga proxy field at code sample sa 7 wika.
Presyo
$1.30 $0.0013 bawat task
Ipapadala mo
URL ng page at ang Tencent app id
Matatanggap mo
Mga value ng ticket at randstr

Overview at presyo

Mga pangalan ng task type

Gamitin ang unang pangalan para mag-solve nang walang proxy. Gamitin ang pangalawang pangalan at idagdag ang mga proxy field para mag-solve gamit ang sarili mong proxy. Pareho ang presyo.
TencentTaskProxylessWalang proxy
TencentTaskGamit ang iyong proxy

Task object

type
StringRequired
Pangalan ng task type. Tumutugma kahit anong letter case. TencentTaskProxyless | TencentTask
websiteURL
StringRequired
Buong address ng page kung saan lumalabas ang CAPTCHA, nagsisimula sa http:// o https://.
appId
StringRequired
Ang app id ng widget, mula sa page source.
captchaScript
StringOptional
Address ng Tencent CAPTCHA script, kung custom ang gamit ng page.

Ang mga field na wala sa listahang ito ay ipinapasa sa solver kung paano ipinadala.

Mga proxy field

Para lang sa pangalan ng proxy type. Ipadala ang magkakahiwalay na field o isang proxy string.
proxyType
StringRequired
http, https, socks4 o socks5.
proxyAddress
StringRequired
IP address o host name ng proxy.
proxyPort
IntegerRequired
Port ng proxy.
proxyLogin
StringOptional
User name ng proxy, kung kailangan ito ng proxy.
proxyPassword
StringOptional
Password ng proxy, kung kailangan ito ng proxy.
proxy
String
Lahat ng proxy field sa isang string, halimbawa http://user:pass@1.2.3.4:8080.

Paggamit ng proxy

Request

POST /createTask
{
  "clientKey": "YOUR_API_KEY",
  "task": {
    "type": "TencentTaskProxyless",
    "websiteURL": "https://example.com/login",
    "appId": "190014885"
  }
}

Solution object

Ibinabalik sa solution kapag ready ang status.
appid
String
Ang app id ng Tencent.
ret
Integer
Tencent result code. 0 ay pasado.
ticket
String
Tencent ticket na isusumite.
randstr
String
Tencent random string na isusumite.
POST /getTaskResult
{
  "errorId": 0,
  "taskId": 1001,
  "status": "ready",
  "solution": {
    "appid": "190014885",
    "ret": 0,
    "ticket": "tr034XXXXXXXXXXXXXXXXXX*",
    "randstr": "@KVN"
  },
  "cost": "0.0013",
  "createTime": 1791640000,
  "endTime": 1791640014,
  "solveCount": 1
}

Mga code sample

import time, requests

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

task = requests.post(f"{API}/createTask", json={
    "clientKey": KEY,
    "task": {
      "type": "TencentTaskProxyless",
      "websiteURL": "https://example.com/login",
      "appId": "190014885"
    }
}).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 form method

Parehong task gamit ang classic na form request. Ibinabalik ng res.php ang sagot bilang text.
in.php, res.php
curl -s "https://unlock-api.com/in.php" -d "key=YOUR_API_KEY&method=tencent&appId=APP_ID&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"}

Form API: in.php at res.php