UNLOCK API
GeeTest v3 / v4

GeeTest v3 / v4

Come inviare un task GeeTest v3 / v4 a UNLOCK API con createTask o in.php: nomi dei tipi di task, tutti i parametri, l'oggetto solution, i campi proxy ed esempi di codice in 7 linguaggi.
Prezzo
$0.70 $0.0007 per task
Invii
URL della pagina con gt e challenge (v3) o captcha_id (v4)
Ricevi
I valori inviati dal form GeeTest

Panoramica e prezzo

Nomi dei tipi di task

Usa il primo nome per risolvere senza proxy. Usa il secondo nome e aggiungi i campi proxy per risolvere tramite il tuo proxy. Il prezzo è lo stesso.
GeeTestTaskProxylessSenza proxy
GeeTestTaskTramite il tuo proxy

Oggetto task

type
StringObbligatorio
Nome del tipo di task. Maiuscole e minuscole sono indifferenti. GeeTestTaskProxyless | GeeTestTask
websiteURL
StringObbligatorio
Indirizzo completo della pagina in cui compare il CAPTCHA, che inizia con http:// o https://.
gt
StringFacoltativo
GeeTest v3: il valore gt della pagina.
challenge
StringFacoltativo
GeeTest v3: un valore challenge nuovo. Ottienine uno nuovo per ogni task.
geetestApiServerSubdomain
StringFacoltativo
Server API di GeeTest, se la pagina ne usa uno proprio.
version
IntegerFacoltativo
4 per GeeTest v4. Predefinito 3.
initParameters
ObjectFacoltativo
GeeTest v4: un oggetto con captcha_id.
userAgent
StringFacoltativo
User-Agent del browser da usare durante la risoluzione. Invia lo stesso quando invii la risposta.

I campi non elencati qui vengono passati al risolutore così come sono stati inviati.

Campi proxy

Solo per il nome del tipo con proxy. Invia i campi separati oppure una sola stringa proxy.
proxyType
StringObbligatorio
http, https, socks4 o socks5.
proxyAddress
StringObbligatorio
Indirizzo IP o nome host del proxy.
proxyPort
IntegerObbligatorio
Porta del proxy.
proxyLogin
StringFacoltativo
Nome utente del proxy, se richiesto.
proxyPassword
StringFacoltativo
Password del proxy, se richiesta.
proxy
String
Tutti i campi proxy in una stringa, ad esempio http://user:pass@1.2.3.4:8080.

Usare un proxy

Richiesta

POST /createTask
{
  "clientKey": "YOUR_API_KEY",
  "task": {
    "type": "GeeTestTaskProxyless",
    "websiteURL": "https://example.com/login",
    "gt": "81388ea1fc187e0c335c0a8907ff2625",
    "challenge": "2e2f0f65240058b683cb6ea21c303eea"
  }
}

Oggetto solution

Restituito in solution quando status è ready.
challenge
String
challenge di GeeTest v3 da inviare.
validate
String
Valore validate di GeeTest v3.
seccode
String
Valore seccode di GeeTest v3.
captcha_id
String
captcha_id di GeeTest v4.
lot_number
String
lot_number di GeeTest v4.
pass_token
String
pass_token di GeeTest v4.
gen_time
String
gen_time di GeeTest v4.
captcha_output
String
captcha_output di GeeTest v4.
POST /getTaskResult
{
  "errorId": 0,
  "taskId": 1001,
  "status": "ready",
  "solution": {
    "challenge": "1ad03db8aff920037fb8117827eab171gu",
    "validate": "0e0ab9f2fdbf7b8e2c3c1a2d4f2c9b07",
    "seccode": "0e0ab9f2fdbf7b8e2c3c1a2d4f2c9b07|jordan",
    "captcha_id": "(v4) e392e1d7fd421dc63325744d5a2b9c73",
    "lot_number": "(v4) e6c3bed2854f41f880662c48afff5dcb",
    "pass_token": "(v4) fad5eb52fc83bf7617f4...",
    "gen_time": "(v4) 1693924478",
    "captcha_output": "(v4) fN36ufW6cQN2SQ-I..."
  },
  "cost": "0.0007",
  "createTime": 1791640000,
  "endTime": 1791640014,
  "solveCount": 1
}

Esempi di codice

import time, requests

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

task = requests.post(f"{API}/createTask", json={
    "clientKey": KEY,
    "task": {
      "type": "GeeTestTaskProxyless",
      "websiteURL": "https://example.com/login",
      "gt": "81388ea1fc187e0c335c0a8907ff2625",
      "challenge": "2e2f0f65240058b683cb6ea21c303eea"
    }
}).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")

Metodo form in.php

Lo stesso task con la classica richiesta form. res.php restituisce la risposta come testo.
in.php, res.php
curl -s "https://unlock-api.com/in.php" -d "key=YOUR_API_KEY&method=geetest&gt=GT&challenge=CHALLENGE&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 a form: in.php e res.php