forked from AdminAnticaptcha/anticaptcha-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgeetest_proxyless_example.py
37 lines (31 loc) · 1020 Bytes
/
geetest_proxyless_example.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
from anticaptchaofficial.geetestproxyless import *
# V3 example:
solver = geetestProxyless()
solver.set_verbose(1)
solver.set_key("YOUR_API_KEY")
solver.set_website_url("https://address.com")
solver.set_gt_key("CONSTANT_GT_KEY")
solver.set_challenge_key("VARIABLE_CHALLENGE_KEY")
# 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)
# V4 example:
solver = geetestProxyless()
solver.set_verbose(1)
solver.set_key("YOUR_API_KEY")
solver.set_website_url("https://address.com")
solver.set_gt_key("captchaId value")
solver.set_version(4)
solver.set_init_parameters({"riskType": "slide"})
token = solver.solve_and_return_solution()
if token != 0:
print("result tokens: ")
print(token)
else:
print("task finished with error "+solver.error_code)