GeeTestTask: प्रॉक्सी के माध्यम से geetest.com पर कैप्चा हल करें
इस प्रकार का कार्य हमारे कर्मचारियों के ब्राउज़र में GeeTest कैप्चा को हल करता है। आपका ऐप वेबसाइट का पता, जीटी कुंजी, चुनौती कुंजी सबमिट करता है और कार्य पूरा होने के बाद 3 टोकन से युक्त समाधान प्राप्त करता है। संस्करण के लिए GeeTest संस्करण 4 आउटपुट में 5 मान होते हैं और चुनौती कुंजी की आवश्यकता नहीं होती है।








उदाहरण
टास्क ऑब्जेक्ट
संबंधित ट्यूटोरियल: फनकैप्चा और गीतेस्ट के लिए एपीआई पैरामीटर खोजने के लिए क्रोम में ब्रेकप्वाइंट का उपयोग करना सीखें
प्रॉपर्टी | टाइप | आवश्यक | लक्ष्य |
---|---|---|---|
type | स्ट्रिंग | हाँ | GeeTestTask |
websiteURL | स्ट्रिंग | हाँ | किसी लक्षित वेब पेज का पता। यह वेबसाइट में कहीं भी पाया जा सकता है, किसी सदस्य वाले एरिया में भी। हमारे कर्मचारी वहां जाते तो नहीं, पर अपने जाने की सिमुलेशन ज़रूर कर देते हैं। |
gt | स्ट्रिंग | हाँ | डोमेन वाली सार्वजानिक कुंजी, जिसे कभी-कभार ही अपडेट किया जाता है। |
challenge | स्ट्रिंग | हाँ | टोकन कुंजी को बदलना। प्रत्येक कैप्चा के लिए एक नयी टोकन कुंजी लेना ना भूलें, नहीं तो आपको एरर टास्क का शुल्क अदा करना होगा। |
geetestApiServerSubdomain | स्ट्रिंग | नहीं | वैकल्पिक API सबडोमेन: कुछ क्रियान्वयनों के लिए इसकी ज़रूरत पड़ सकती है।
![]() |
geetestGetLib | स्ट्रिंग | नहीं | कुछ क्रियान्वयनों के लिए आवश्यक। किसी स्ट्रिंग में एनकोड किए गए JSON को भेज दें। वैल्यू को ब्राउज़र डेवलपमेंट टूल्स में जाकर ट्रेस किया जा सकता है। "initGeetest" फंक्शन के इस्तेमाल से पहले एक ब्रेक पॉइंट डाल दें।
![]() |
version | इन्टिजर | नहीं | संस्करण संख्या। डिफ़ॉल्ट संस्करण 3 है। समर्थित संस्करण: 3 और 4। |
initParameters | ऑब्जेक्ट | नहीं | संस्करण 4 . के लिए अतिरिक्त आरंभीकरण पैरामीटर |
proxyType | स्ट्रिंग | हाँ | प्रॉक्सी प्रकार http - सामान्य http/https प्रॉक्सी socks4 - socks4 प्रॉक्सी socks5 - socks5 प्रॉक्सी |
proxyAddress | स्ट्रिंग | हाँ | प्रॉक्सी IP पता ipv4/ipv6. लोकल नेटवर्कों वाले कोई होस्ट नेम या IP पते मौजूद नहीं हैं। |
proxyPort | इन्टिजर | हाँ | प्रॉक्सी पोर्ट |
proxyLogin | स्ट्रिंग | नहीं | प्रॉक्सी वाला लॉगइन, जिसके लिए ऑथरायज़ेशन (बेसिक) आवश्यक होती है |
proxyPassword | स्ट्रिंग | नहीं | प्रॉक्सी पासवर्ड |
userAgent | स्ट्रिंग | हाँ | ब्राउज़र का उपयोगकर्ता व एजेंट, जिसका इस्तेमाल एम्यूलेशन में किया जाता है। आपको किसी आधुनिक ब्राउज़र के सिग्नेचर का इस्तेमाल करना होगा, नहीं तो Google आपसे "अपने ब्राउज़र को अपडेट" करने के लिए कहेगा। |
अनुरोध का उदाहरण (V3)
CURL
curl -i -H "Accept: application/json" \
-H "Content-Type: application/json" \
-X POST -d '{
"clientKey":"YOUR_API_KEY_HERE",
"task":
{
"type":"GeeTestTask",
"websiteURL":"http://mywebsite.com/geetest/test.php",
"gt":"874703612e5cac182812a00e273aad0d",
"challenge":"a559b82bca2c500101a1c8a4f4204742",
"proxyType":"http",
"proxyAddress":"8.8.8.8",
"proxyPort":8080,
"proxyLogin":"proxyLoginHere",
"proxyPassword":"proxyPasswordHere",
"userAgent":"MODERN_USER_AGENT_HERE"
},
"softId": 0
}' https://api.anti-captcha.com/createTask
PHP
<?php
//git clone git@github.com:AdminAnticaptcha/anticaptcha-php.git
include("anticaptcha.php");
include("geetest.php");
$api = new GeeTest();
$api->setVerboseMode(true);
//grabbing challenge key ... ";
$data = json_decode(file_get_contents("https://www.geetest.com/demo/gt/register-enIcon-official?t=1547634498036"), true);
echo "grabbed data:\n";
print_r($data);
if (!isset($data["gt"]) && !isset($data["challange"])) {
echo "something went wrong, probably example was changed or network is inaccessible\n";
exit;
}
$challenge = $data["challenge"];
$gt = $data["gt"];
echo "setting gt=$gt, challenge=$challenge\n";
$api->setWebsiteURL("https://www.geetest.com/en/");
$api->setGTKey($gt);
$api->setChallenge($challenge);
//optional API subdomain, make sure you understand what to set here
$api->setAPISubdomain("optional.subdomain.api.geetest.com");
//read the docs about this optional parameter
$api->setGeetestLib("{\"customlibs\":\"url-to-lib.js\"}");
//proxy access parameters
$api->setProxyType("http");
$api->setProxyAddress("8.8.8.8");
$api->setProxyPort(1234);
//optional login and password
$api->setProxyLogin("login");
$api->setProxyPassword("password");
//your anti-captcha.com account key
$api->setKey("YOUR_API_KEY_HERE");
//Specify softId to earn 10% commission with your app.
//Get your softId here: https://anti-captcha.com/clients/tools/devcenter
$api->setSoftId(0);
//create task in API
if (!$api->createTask()) {
$api->debout("API v2 send failed - ".$api->getErrorMessage(), "red");
return false;
}
$taskId = $api->getTaskId();
//wait in a loop for max 300 seconds till task is solved
if (!$api->waitForResult(300)) {
echo "could not solve captcha\n";
echo $api->getErrorMessage()."\n";
} else {
echo "your geetest tokens:\n";
print_r($api->getTaskSolution());
}
Python
#pip3 install anticaptchaofficial
from anticaptchaofficial.geetestproxyon import *
solver = geetestProxyon()
solver.set_verbose(1)
solver.set_key("YOUR_API_KEY_HERE")
solver.set_website_url("https://address.com")
solver.set_gt_key("CONSTANT_GT_KEY")
solver.set_challenge_key("VARIABLE_CHALLENGE_KEY")
# optional API subdomain, make sure you understand what to set here
# solver.set_js_api_domain("custom-domain.geetest.com")
# getLib payload, see documentation for explanation of this
# solver.set_geetest_lib("{\"customlibs\":\"url-to-lib.js\"}")
solver.set_proxy_address("PROXY_ADDRESS")
solver.set_proxy_port(1234)
solver.set_proxy_login("proxylogin")
solver.set_proxy_password("proxypassword")
solver.set_user_agent("Mozilla/5.0")
# Specify softId to earn 10% commission with your app.
# Get your softId here: https://anti-captcha.com/clients/tools/devcenter
solver.set_soft_id(0)
token = solver.solve_and_return_solution()
if token != 0:
print "result tokens: "
print token
else:
print "task finished with error "+solver.error_code
NodeJS
//npm install @antiadmin/anticaptchaofficial
//https://github.com/AdminAnticaptcha/anticaptcha-npm
const ac = require("@antiadmin/anticaptchaofficial");
ac.setAPIKey('YOUR_API_KEY_HERE');
//Specify softId to earn 10% commission with your app.
//Get your softId here: https://anti-captcha.com/clients/tools/devcenter
ac.setSoftId(0);
ac.solveGeeTestProxyOn('http://DOMAIN.COM',
'GT',
'CHALLENGE',
'API_SUBDOMAIN',
'GET_LIB',
'http', //http, socks4, socks5
'PROXY_ADDRESS',
'PROXY_PORT',
'PROXY_LOGIN',
'PROXY_PASSWORD',
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116',
'some=cookies')
.then(result => {
console.log('result: ');
console.log(result);
})
.catch(error => console.log('test received error '+error));
Java
//git clone git@github.com:AdminAnticaptcha/anticaptcha-java.git
package com.anti_captcha;
import com.anti_captcha.Api.GeeTestProxyless;
import com.anti_captcha.Helper.DebugHelper;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Iterator;
import java.util.concurrent.ThreadLocalRandom;
public class Main {
public static void main(String[] args) throws InterruptedException, MalformedURLException, JSONException {
DebugHelper.setVerboseMode(true);
GeeTest api = new GeeTest();
api.setClientKey("YOUR_API_KEY_HERE");
api.setWebsiteUrl(new URL("http://biletmaster.com/"));
api.setWebsiteKey("be33de396f8d04030f6eca8fbd225071");
api.setWebsiteChallenge("grabbed_one_time_challenge_32bytes");
//optional API subdomain, make sure you understand what to set here
//api.setGeetestApiServerSubdomain("optional.subdomain.api.geetest.com");
//read the docs about this optional parameter
//api.setGeetestLib("{\"customlibs\":\"url-to-lib.js\"}");
// proxy access parameters
// DO NOT USE PURCHASED/RENTED PROXIES WITH PROXY SERVICES!!!
api.setProxyType(RecaptchaV2.ProxyTypeOption.HTTP);
api.setProxyAddress("xx.xxx.xx.xx");
api.setProxyPort(8282);
api.setProxyLogin("login");
api.setProxyPassword("password");
//Specify softId to earn 10% commission with your app.
//Get your softId here: https://anti-captcha.com/clients/tools/devcenter
api.setSoftId(0);
if (!api.createTask()) {
DebugHelper.out(
"API v2 send failed. " + api.getErrorMessage(),
DebugHelper.Type.ERROR
);
} else if (!api.waitForResult()) {
DebugHelper.out("Could not solve the captcha.", DebugHelper.Type.ERROR);
} else {
DebugHelper.out("Result CHALLENGE: " + api.getTaskSolution().getChallenge(), DebugHelper.Type.SUCCESS);
DebugHelper.out("Result SECCODE: " + api.getTaskSolution().getSeccode(), DebugHelper.Type.SUCCESS);
DebugHelper.out("Result VALIDATE: " + api.getTaskSolution().getValidate(), DebugHelper.Type.SUCCESS);
}
}
}
अनुरोध का उदाहरण (V4)
CURL
curl -i -H "Accept: application/json" \
-H "Content-Type: application/json" \
-X POST -d '{
"clientKey":"YOUR_API_KEY_HERE",
"task":
{
"type":"GeeTestTask",
"websiteURL":"http://mywebsite.com/geetest/test.php",
"gt":"874703612e5cac182812a00e273aad0d",
"version":4,
"initParameters": {
"riskType": "slide"
}
"proxyType":"http",
"proxyAddress":"8.8.8.8",
"proxyPort":8080,
"proxyLogin":"proxyLoginHere",
"proxyPassword":"proxyPasswordHere",
"userAgent":"MODERN_USER_AGENT_HERE"
},
"softId": 0
}' https://api.anti-captcha.com/createTask
PHP
<?php
//git clone git@github.com:AdminAnticaptcha/anticaptcha-php.git
include("anticaptcha.php");
include("geetest.php");
$api = new GeeTest();
$api->setVerboseMode(true);
$api->setWebsiteURL("https://www.geetest.com/en/adaptive-captcha-demo");
$api->setGTKey("fcd636b4514bf7ac4143922550b3008b");
$api->setVersion(4);
$api->setInitParameters([
"riskType": "slide"
]);
//optional API subdomain, make sure you understand what to set here
$api->setAPISubdomain("optional.subdomain.api.geetest.com");
//proxy access parameters
$api->setProxyType("http");
$api->setProxyAddress("8.8.8.8");
$api->setProxyPort(1234);
//optional login and password
$api->setProxyLogin("login");
$api->setProxyPassword("password");
//your anti-captcha.com account key
$api->setKey("YOUR_API_KEY_HERE");
//Specify softId to earn 10% commission with your app.
//Get your softId here: https://anti-captcha.com/clients/tools/devcenter
$api->setSoftId(0);
//create task in API
if (!$api->createTask()) {
$api->debout("API v2 send failed - ".$api->getErrorMessage(), "red");
return false;
}
$taskId = $api->getTaskId();
//wait in a loop for max 300 seconds till task is solved
if (!$api->waitForResult(300)) {
echo "could not solve captcha\n";
echo $api->getErrorMessage()."\n";
} else {
echo "your geetest tokens:\n";
print_r($api->getTaskSolution());
}
Python
#pip3 install anticaptchaofficial
from anticaptchaofficial.geetestproxyon import *
solver = geetestProxyon()
solver.set_verbose(1)
solver.set_key("YOUR_API_KEY_HERE")
solver.set_website_url("https://address.com")
solver.set_gt_key("captchaId value")
solver.set_version(4)
# optional API subdomain, make sure you understand what to set here
# solver.set_js_api_domain("custom-domain.geetest.com")
# optional initialization parameters
# solver.set_init_parameters({"riskType": "slide"})
solver.set_proxy_address("PROXY_ADDRESS")
solver.set_proxy_port(1234)
solver.set_proxy_login("proxylogin")
solver.set_proxy_password("proxypassword")
solver.set_user_agent("Mozilla/5.0")
# Specify softId to earn 10% commission with your app.
# Get your softId here: https://anti-captcha.com/clients/tools/devcenter
solver.set_soft_id(0)
token = solver.solve_and_return_solution()
if token != 0:
print "result tokens: "
print token
else:
print "task finished with error "+solver.error_code
NodeJS
//npm install @antiadmin/anticaptchaofficial
//https://github.com/AdminAnticaptcha/anticaptcha-npm
const ac = require("@antiadmin/anticaptchaofficial");
ac.setAPIKey('YOUR_API_KEY_HERE');
//Specify softId to earn 10% commission with your app.
//Get your softId here: https://anti-captcha.com/clients/tools/devcenter
ac.setSoftId(0);
ac.solveGeeTestV4ProxyOn('http://DOMAIN.COM',
'captchaId',
'API_SUBDOMAIN',
{
"riskType": "slide"
},
'http', //http, socks4, socks5
'PROXY_ADDRESS',
'PROXY_PORT',
'PROXY_LOGIN',
'PROXY_PASSWORD',
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116',
'some=cookies')
.then(result => {
console.log('result: ');
console.log(result);
})
.catch(error => console.log('test received error '+error));
Java
//git clone git@github.com:AdminAnticaptcha/anticaptcha-java.git
package com.anti_captcha;
import com.anti_captcha.Api.GeeTestProxyless;
import com.anti_captcha.Helper.DebugHelper;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Iterator;
import java.util.concurrent.ThreadLocalRandom;
public class Main {
public static void main(String[] args) throws InterruptedException, MalformedURLException, JSONException {
DebugHelper.setVerboseMode(true);
GeeTest api = new GeeTestV4();
api.setClientKey("YOUR_API_KEY_HERE");
api.setWebsiteUrl(new URL("https://auth.geetest.com/"));
api.setWebsiteKey("b6e21f90a91a3c2d4a31fe84e10d0442");
//optional API subdomain, make sure you understand what to set here
//api.setGeetestApiServerSubdomain("optional.subdomain.api.geetest.com");
// optional initialization parameters
JSONObject additionalInitParameters = new JSONObject();
try {
additionalInitParameters.put("riskType", "ai");
} catch (Exception e) {
DebugHelper.out("JSON error: "+e.getMessage(), DebugHelper.Type.ERROR);
return;
}
api.setInitParameters(additionalInitParameters);
// proxy access parameters
// DO NOT USE PURCHASED/RENTED PROXIES WITH PROXY SERVICES!!!
api.setProxyType(RecaptchaV2.ProxyTypeOption.HTTP);
api.setProxyAddress("xx.xxx.xx.xx");
api.setProxyPort(8282);
api.setProxyLogin("login");
api.setProxyPassword("password");
//Specify softId to earn 10% commission with your app.
//Get your softId here: https://anti-captcha.com/clients/tools/devcenter
api.setSoftId(0);
if (!api.createTask()) {
DebugHelper.out(
"API v2 send failed. " + api.getErrorMessage(),
DebugHelper.Type.ERROR
);
} else if (!api.waitForResult()) {
DebugHelper.out("Could not solve the captcha.", DebugHelper.Type.ERROR);
} else {
DebugHelper.out("Result captcha_id: " + api.getTaskSolution().getCaptchaId(), DebugHelper.Type.SUCCESS);
DebugHelper.out("Result lot_number: " + api.getTaskSolution().getLotNumber(), DebugHelper.Type.SUCCESS);
DebugHelper.out("Result pass_token: " + api.getTaskSolution().getPassToken(), DebugHelper.Type.SUCCESS);
DebugHelper.out("Result gen_time: " + api.getTaskSolution().getGenTime(), DebugHelper.Type.SUCCESS);
DebugHelper.out("Result captcha_output: " + api.getTaskSolution().getCaptchaOutput(), DebugHelper.Type.SUCCESS);
}
}
}
रिस्पांस का उदाहरण
एरर-मुक्त JSON
{
"errorId": 0,
"taskId": 7654321
}
एरर-युक्त JSON
{
"errorId": 1,
"errorCode": "ERROR_KEY_DOES_NOT_EXIST",
"errorDescription": "Account authorization key not found in the system"
}
सॉल्यूशन को पुनः प्राप्त करें
सॉल्यूशन का अनुरोध करने के लिए getTaskResult विधि का इस्तेमाल करें। अपना पहला अनुरोध करने से पहले कर्मचारी को थोड़ा वक़्त दें, जैसे लगभग 5 सेकंड का। अगर कर्मचारी इसके बाद भी बिज़ी दिखाई देता है तो कृपया 3 सेकंड में पुनः प्रयास करें।
टास्क सॉल्यूशन ऑब्जेक्ट (V3)
प्रॉपर्टी | टाइप | लक्ष्य |
---|---|---|
challenge | स्ट्रिंग | हैश स्ट्रिंग, जिसकी ज़रूरत लक्षित वेबसाइट पर जमा किए गए फॉर्म से इंटरैक्ट करने के लिए होती है। |
validate | स्ट्रिंग | हैश स्ट्रिंग की भी ज़रूरत होती है। |
seccode | स्ट्रिंग | एक और आवश्यक हैश स्ट्रिंग, हमें नहीं पता कि 3 हैश स्ट्रिंग क्यों होती हैं। |
टास्क सॉल्यूशन ऑब्जेक्ट (V4)
प्रॉपर्टी | टाइप |
---|---|
captcha_id | स्ट्रिंग |
lot_number | स्ट्रिंग |
pass_token | स्ट्रिंग |
gen_time | इन्टिजर |
captcha_output | स्ट्रिंग |
रिस्पांस का उदाहरण (v3)
एरर-मुक्त JSON
{
"errorId":0,
"status":"ready",
"solution":
{
"challenge":"3c1c5153aa48011e92883aed820069f3hj",
"validate":"47ad5a0a6eb98a95b2bcd9e9eecc8272",
"seccode":"83fa4f2d23005fc91c3a015a1613f803|jordan"
},
"cost":"0.001500",
"ip":"46.98.54.221",
"createTime":1472205564,
"endTime":1472205570,
"solveCount":"0"
}
टोकन के इस्तेमाल का उदाहरण

रिस्पांस का उदाहरण (v4)
एरर-मुक्त JSON
{
"errorId":0,
"status":"ready",
"solution":
{
"captcha_id": "fcd636b4514bf7ac4143922550b3008b",
"lot_number": "354ab6dd4e594fdc903074c4d8d37b24",
"pass_token": "b645946a654e60218c7922b74b3b5ee8e8717e8fd3cd5182a5c98d660bbd1ed5",
"gen_time": "1649921519",
"captcha_output": "cFPIALDXSop8Ri2mPABbRWzNBs86N8D4vNUTuVa7wN7E...[cut]...ciM50ePCCzLBZ1bmaV9Yt7IkkFI9Emx4eaP8rRoA=="
},
"cost":"0.001500",
"ip":"46.98.54.221",
"createTime":1472205564,
"endTime":1472205570,
"solveCount":"0"
}