This commit is contained in:
captchasolver
2025-03-20 22:05:27 +02:00
commit 9485706a68
59 changed files with 3156 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
import sys
import os
sys.path.append(os.path.dirname(os.path.dirname(os.path.realpath(__file__))))
from solvecaptcha import Solvecaptcha
# In this example, we store the API key in environment variables, which can be set as follows:
# On Linux or macOS:
# export APIKEY_SOLVECAPTCHA=1abc234de56fab7c89012d34e56fa7b8
# On Windows:
# set APIKEY_SOLVECAPTCHA=1abc234de56fab7c89012d34e56fa7b8
# Alternatively, you can directly assign the API key to a variable:
# api_key = "1abc234de56fab7c89012d34e56fa7b8"
api_key = os.getenv('APIKEY_SOLVECAPTCHA', 'YOUR_API_KEY')
solver = Solvecaptcha(api_key)
try:
result = solver.canvas('./images/canvas.jpg', hintText='Draw around apple')
except Exception as e:
sys.exit(e)
else:
sys.exit('result: ' + str(result))
+31
View File
@@ -0,0 +1,31 @@
import sys
import os
from base64 import b64encode
sys.path.append(os.path.dirname(os.path.dirname(os.path.realpath(__file__))))
from solvecaptcha import Solvecaptcha
# In this example, we store the API key in environment variables, which can be set as follows:
# On Linux or macOS:
# export APIKEY_SOLVECAPTCHA=1abc234de56fab7c89012d34e56fa7b8
# On Windows:
# set APIKEY_SOLVECAPTCHA=1abc234de56fab7c89012d34e56fa7b8
# Alternatively, you can directly assign the API key to a variable:
# api_key = "1abc234de56fab7c89012d34e56fa7b8"
api_key = os.getenv('APIKEY_SOLVECAPTCHA', 'YOUR_API_KEY')
solver = Solvecaptcha(api_key)
with open('./images/canvas.jpg', 'rb') as f:
b64 = b64encode(f.read()).decode('utf-8')
try:
result = solver.canvas(b64, hintText='Draw around apple')
except Exception as e:
sys.exit(e)
else:
sys.exit('result: ' + str(result))
+33
View File
@@ -0,0 +1,33 @@
import sys
import os
sys.path.append(os.path.dirname(os.path.dirname(os.path.realpath(__file__))))
from solvecaptcha import Solvecaptcha
# In this example, we store the API key in environment variables, which can be set as follows:
# On Linux or macOS:
# export APIKEY_SOLVECAPTCHA=1abc234de56fab7c89012d34e56fa7b8
# On Windows:
# set APIKEY_SOLVECAPTCHA=1abc234de56fab7c89012d34e56fa7b8
# Alternatively, you can directly assign the API key to a variable:
# api_key = "1abc234de56fab7c89012d34e56fa7b8"
api_key = os.getenv('APIKEY_SOLVECAPTCHA', 'YOUR_API_KEY')
solver = Solvecaptcha(api_key, defaultTimeout=120, pollingInterval=5, server='solvecaptcha.com')
try:
result = solver.canvas(
'./images/canvas.jpg',
previousId=0,
canSkip=0,
lang='en',
hintImg='./images/canvas_hint.jpg',
hintText='Draw around apple',
)
except Exception as e:
sys.exit(e)
else:
sys.exit('result: ' + str(result))
+26
View File
@@ -0,0 +1,26 @@
import sys
import os
sys.path.append(os.path.dirname(os.path.dirname(os.path.realpath(__file__))))
from solvecaptcha import Solvecaptcha
# In this example, we store the API key in environment variables, which can be set as follows:
# On Linux or macOS:
# export APIKEY_SOLVECAPTCHA=1abc234de56fab7c89012d34e56fa7b8
# On Windows:
# set APIKEY_SOLVECAPTCHA=1abc234de56fab7c89012d34e56fa7b8
# Alternatively, you can directly assign the API key to a variable:
# api_key = "1abc234de56fab7c89012d34e56fa7b8"
api_key = os.getenv('APIKEY_SOLVECAPTCHA', 'YOUR_API_KEY')
solver = Solvecaptcha(api_key)
try:
result = solver.coordinates('./images/grid.jpg')
except Exception as e:
sys.exit(e)
else:
sys.exit('result: ' + str(result))
+31
View File
@@ -0,0 +1,31 @@
import sys
import os
from base64 import b64encode
sys.path.append(os.path.dirname(os.path.dirname(os.path.realpath(__file__))))
from solvecaptcha import Solvecaptcha
# In this example, we store the API key in environment variables, which can be set as follows:
# On Linux or macOS:
# export APIKEY_SOLVECAPTCHA=1abc234de56fab7c89012d34e56fa7b8
# On Windows:
# set APIKEY_SOLVECAPTCHA=1abc234de56fab7c89012d34e56fa7b8
# Alternatively, you can directly assign the API key to a variable:
# api_key = "1abc234de56fab7c89012d34e56fa7b8"
api_key = os.getenv('APIKEY_SOLVECAPTCHA', 'YOUR_API_KEY')
solver = Solvecaptcha(api_key)
with open('./images/grid.jpg', 'rb') as f:
b64 = b64encode(f.read()).decode('utf-8')
try:
result = solver.coordinates(b64)
except Exception as e:
sys.exit(e)
else:
sys.exit('result: ' + str(result))
+29
View File
@@ -0,0 +1,29 @@
import sys
import os
sys.path.append(os.path.dirname(os.path.dirname(os.path.realpath(__file__))))
from solvecaptcha import Solvecaptcha
# In this example, we store the API key in environment variables, which can be set as follows:
# On Linux or macOS:
# export APIKEY_SOLVECAPTCHA=1abc234de56fab7c89012d34e56fa7b8
# On Windows:
# set APIKEY_SOLVECAPTCHA=1abc234de56fab7c89012d34e56fa7b8
# Alternatively, you can directly assign the API key to a variable:
# api_key = "1abc234de56fab7c89012d34e56fa7b8"
api_key = os.getenv('APIKEY_SOLVECAPTCHA', 'YOUR_API_KEY')
solver = Solvecaptcha(api_key, defaultTimeout=120, pollingInterval=5, extendedResponse=True)
try:
result = solver.coordinates('./images/grid_2.jpg',
lang='en',
hintImg='./images/grid_hint.jpg',
hintText='Select all images with an Orange')
except Exception as e:
sys.exit(e)
else:
sys.exit('result: ' + str(result))
+29
View File
@@ -0,0 +1,29 @@
import sys
import os
sys.path.append(os.path.dirname(os.path.dirname(os.path.realpath(__file__))))
from solvecaptcha import Solvecaptcha
# In this example, we store the API key in environment variables, which can be set as follows:
# On Linux or macOS:
# export APIKEY_SOLVECAPTCHA=1abc234de56fab7c89012d34e56fa7b8
# On Windows:
# set APIKEY_SOLVECAPTCHA=1abc234de56fab7c89012d34e56fa7b8
# Alternatively, you can directly assign the API key to a variable:
# api_key = "1abc234de56fab7c89012d34e56fa7b8"
api_key = os.getenv('APIKEY_SOLVECAPTCHA', 'YOUR_API_KEY')
solver = Solvecaptcha(api_key)
try:
result = solver.funcaptcha(sitekey='1C2BB537-D5F7-4A66-BC74-25881B58F1D6',
url='https://agoda-api.arkoselabs.com/v2/1C2BB537-D5F7-4A66-BC74-25881B58F1D6/api.js',
surl='https://client-api.arkoselabs.com')
except Exception as e:
sys.exit(e)
else:
sys.exit('result: ' + str(result))
+36
View File
@@ -0,0 +1,36 @@
import sys
import os
sys.path.append(os.path.dirname(os.path.dirname(os.path.realpath(__file__))))
from solvecaptcha import Solvecaptcha
# In this example, we store the API key in environment variables, which can be set as follows:
# On Linux or macOS:
# export APIKEY_SOLVECAPTCHA=1abc234de56fab7c89012d34e56fa7b8
# On Windows:
# set APIKEY_SOLVECAPTCHA=1abc234de56fab7c89012d34e56fa7b8
# Alternatively, you can directly assign the API key to a variable:
# api_key = "1abc234de56fab7c89012d34e56fa7b8"
api_key = os.getenv('APIKEY_SOLVECAPTCHA', 'YOUR_API_KEY')
solver = Solvecaptcha(api_key, defaultTimeout=180, pollingInterval=15)
try:
result = solver.funcaptcha(
sitekey='1C2BB537-D5F7-4A66-BC74-25881B58F1D6',
url='https://agoda-api.arkoselabs.com/v2/1C2BB537-D5F7-4A66-BC74-25881B58F1D6/api.js',
surl='https://client-api.arkoselabs.com',
userAgent='Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Safari/537.36',
# **{'data[key]': 'value'}, #optional data param used by some websites
# proxy={
# 'type': 'HTTP',
# 'uri': 'login:password@123.123.123.123:8080'
# }
)
except Exception as e:
sys.exit(e)
else:
sys.exit('result: ' + str(result))
+37
View File
@@ -0,0 +1,37 @@
import sys
import os
import requests
sys.path.append(os.path.dirname(os.path.dirname(os.path.realpath(__file__))))
from solvecaptcha import Solvecaptcha
# In this example, we store the API key in environment variables, which can be set as follows:
# On Linux or macOS:
# export APIKEY_SOLVECAPTCHA=1abc234de56fab7c89012d34e56fa7b8
# On Windows:
# set APIKEY_SOLVECAPTCHA=1abc234de56fab7c89012d34e56fa7b8
# Alternatively, you can directly assign the API key to a variable:
# api_key = "1abc234de56fab7c89012d34e56fa7b8"
api_key = os.getenv('APIKEY_SOLVECAPTCHA', 'YOUR_API_KEY')
solver = Solvecaptcha(api_key)
"""
Important: The value of the 'challenge' parameter is dynamic. You must obtain a new value for each request to our API.
"""
resp = requests.get("https://mysite.com/api/v1/ captcha-demo/gee-test/init-params")
challenge = resp.json()['challenge']
try:
result = solver.geetest(gt='81388ea1fc187e0c335c0a8907ff2625',
apiServer='http://api.geetest.com',
challenge=challenge,
url='https://mysite.com/page/with//geetest')
except Exception as e:
sys.exit(e)
else:
sys.exit('result: ' + str(result))
+46
View File
@@ -0,0 +1,46 @@
import sys
import os
import requests
sys.path.append(os.path.dirname(os.path.dirname(os.path.realpath(__file__))))
from solvecaptcha import Solvecaptcha
# In this example, we store the API key in environment variables, which can be set as follows:
# On Linux or macOS:
# export APIKEY_SOLVECAPTCHA=1abc234de56fab7c89012d34e56fa7b8
# On Windows:
# set APIKEY_SOLVECAPTCHA=1abc234de56fab7c89012d34e56fa7b8
# Alternatively, you can directly assign the API key to a variable:
# api_key = "1abc234de56fab7c89012d34e56fa7b8"
api_key = os.getenv('APIKEY_SOLVECAPTCHA', 'YOUR_API_KEY')
solver = Solvecaptcha(api_key,
defaultTimeout=300,
pollingInterval=10,
extendedResponse=True)
"""
**Important:** The value of the `challenge` parameter is dynamic. You must obtain a new value for each request to our API.
"""
resp = requests.get("https://mysite.com/api/v1/ captcha-demo/gee-test/init-params")
challenge = resp.json()['challenge']
try:
result = solver.geetest(
gt='81388ea1fc187e0c335c0a8907ff2625',
apiServer='http://api.geetest.com',
challenge=challenge,
url='https://mysite.com/page/with//geetest',
# proxy={
# 'type': 'HTTPS',
# 'uri': 'login:password@IP_address:PORT'
# }
)
except Exception as e:
sys.exit(e)
else:
sys.exit('result: ' + str(result))
+28
View File
@@ -0,0 +1,28 @@
import sys
import os
import requests
sys.path.append(os.path.dirname(os.path.dirname(os.path.realpath(__file__))))
from solvecaptcha import Solvecaptcha
# In this example, we store the API key in environment variables, which can be set as follows:
# On Linux or macOS:
# export APIKEY_SOLVECAPTCHA=1abc234de56fab7c89012d34e56fa7b8
# On Windows:
# set APIKEY_SOLVECAPTCHA=1abc234de56fab7c89012d34e56fa7b8
# Alternatively, you can directly assign the API key to a variable:
# api_key = "1abc234de56fab7c89012d34e56fa7b8"
api_key = os.getenv('APIKEY_SOLVECAPTCHA', 'YOUR_API_KEY')
solver = Solvecaptcha(api_key)
try:
result = solver.geetest_v4(captcha_id='e392e1d7fd421dc63325744d5a2b9c73',
url='https://mysite.com/page/with//geetest-v4')
except Exception as e:
sys.exit(e)
else:
sys.exit('result: ' + str(result))
+42
View File
@@ -0,0 +1,42 @@
import sys
import os
import requests
sys.path.append(os.path.dirname(os.path.dirname(os.path.realpath(__file__))))
from solvecaptcha import Solvecaptcha
# In this example, we store the API key in environment variables, which can be set as follows:
# On Linux or macOS:
# export APIKEY_SOLVECAPTCHA=1abc234de56fab7c89012d34e56fa7b8
# On Windows:
# set APIKEY_SOLVECAPTCHA=1abc234de56fab7c89012d34e56fa7b8
# Alternatively, you can directly assign the API key to a variable:
# api_key = "1abc234de56fab7c89012d34e56fa7b8"
api_key = os.getenv('APIKEY_SOLVECAPTCHA', 'YOUR_API_KEY')
config = {
'server': 'solvecaptcha.com',
'apiKey': api_key,
# 'callback': 'https://your.site/result-receiver', # If set, the solver will return only the `captchaId` without polling the API for the answer.
'defaultTimeout': 120,
'recaptchaTimeout': 600,
'pollingInterval': 10,
}
solver = Solvecaptcha(**config)
try:
result = solver.geetest_v4(captcha_id='e392e1d7fd421dc63325744d5a2b9c73',
url='https://mysite.com/page/with//geetest-v4',
# proxy={
# 'type': 'HTTPS',
# 'uri': 'login:password@IP_address:PORT'
# }
)
except Exception as e:
sys.exit(e)
else:
sys.exit('result: ' + str(result))
+30
View File
@@ -0,0 +1,30 @@
import sys
import os
sys.path.append(os.path.dirname(os.path.dirname(os.path.realpath(__file__))))
from solvecaptcha import Solvecaptcha
# In this example, we store the API key in environment variables, which can be set as follows:
# On Linux or macOS:
# export APIKEY_SOLVECAPTCHA=1abc234de56fab7c89012d34e56fa7b8
# On Windows:
# set APIKEY_SOLVECAPTCHA=1abc234de56fab7c89012d34e56fa7b8
# Alternatively, you can directly assign the API key to a variable:
# api_key = "1abc234de56fab7c89012d34e56fa7b8"
api_key = os.getenv('APIKEY_SOLVECAPTCHA', 'YOUR_API_KEY')
solver = Solvecaptcha(api_key)
try:
result = solver.grid('./images/grid_2.jpg',
hintText='Select all images with an Orange',
rows=3,
cols=3)
except Exception as e:
sys.exit(e)
else:
sys.exit('result: ' + str(result))
+34
View File
@@ -0,0 +1,34 @@
import sys
import os
from base64 import b64encode
sys.path.append(os.path.dirname(os.path.dirname(os.path.realpath(__file__))))
from solvecaptcha import Solvecaptcha
# In this example, we store the API key in environment variables, which can be set as follows:
# On Linux or macOS:
# export APIKEY_SOLVECAPTCHA=1abc234de56fab7c89012d34e56fa7b8
# On Windows:
# set APIKEY_SOLVECAPTCHA=1abc234de56fab7c89012d34e56fa7b8
# Alternatively, you can directly assign the API key to a variable:
# api_key = "1abc234de56fab7c89012d34e56fa7b8"
api_key = os.getenv('APIKEY_SOLVECAPTCHA', 'YOUR_API_KEY')
solver = Solvecaptcha(api_key)
with open('./images/grid_2.jpg', 'rb') as f:
b64 = b64encode(f.read()).decode('utf-8')
try:
result = solver.grid(b64,
hintText='Select all images with an Orange',
rows=3,
cols=3)
except Exception as e:
sys.exit(e)
else:
sys.exit('result: ' + str(result))
+36
View File
@@ -0,0 +1,36 @@
import sys
import os
sys.path.append(os.path.dirname(os.path.dirname(os.path.realpath(__file__))))
from solvecaptcha import Solvecaptcha
# In this example, we store the API key in environment variables, which can be set as follows:
# On Linux or macOS:
# export APIKEY_SOLVECAPTCHA=1abc234de56fab7c89012d34e56fa7b8
# On Windows:
# set APIKEY_SOLVECAPTCHA=1abc234de56fab7c89012d34e56fa7b8
# Alternatively, you can directly assign the API key to a variable:
# api_key = "1abc234de56fab7c89012d34e56fa7b8"
api_key = os.getenv('APIKEY_SOLVECAPTCHA', 'YOUR_API_KEY')
solver = Solvecaptcha(api_key, defaultTimeout=100, pollingInterval=12)
try:
result = solver.grid(
file='./images/grid_2.jpg',
rows=3,
cols=3,
previousId=0,
canSkip=0,
lang='en',
hintImg='./images/grid_hint.jpg',
# hintText='Select all images with an Orange',
)
except Exception as e:
sys.exit(e)
else:
sys.exit('result: ' + str(result))
+34
View File
@@ -0,0 +1,34 @@
import sys
import os
sys.path.append(os.path.dirname(os.path.dirname(os.path.realpath(__file__))))
from solvecaptcha import Solvecaptcha
# In this example, we store the API key in environment variables, which can be set as follows:
# On Linux or macOS:
# export APIKEY_SOLVECAPTCHA=1abc234de56fab7c89012d34e56fa7b8
# On Windows:
# set APIKEY_SOLVECAPTCHA=1abc234de56fab7c89012d34e56fa7b8
# Alternatively, you can directly assign the API key to a variable:
# api_key = "1abc234de56fab7c89012d34e56fa7b8"
api_key = os.getenv('APIKEY_SOLVECAPTCHA', 'YOUR_API_KEY')
solver = Solvecaptcha(api_key)
try:
result = solver.hcaptcha(
sitekey='bf8ccfbf-6a05-45f6-982a-7a7964c2f50c',
url='https://portalunico.siscomex.gov.br',
)
except Exception as e:
sys.exit(e)
else:
sys.exit('result: ' + str(result))
+49
View File
@@ -0,0 +1,49 @@
import sys
import os
sys.path.append(os.path.dirname(os.path.dirname(os.path.realpath(__file__))))
from solvecaptcha import Solvecaptcha
# In this example, we store the API key in environment variables, which can be set as follows:
# On Linux or macOS:
# export APIKEY_SOLVECAPTCHA=1abc234de56fab7c89012d34e56fa7b8
# On Windows:
# set APIKEY_SOLVECAPTCHA=1abc234de56fab7c89012d34e56fa7b8
# Alternatively, you can directly assign the API key to a variable:
# api_key = "1abc234de56fab7c89012d34e56fa7b8"
api_key = os.getenv('APIKEY_SOLVECAPTCHA', 'YOUR_API_KEY')
config = {
'server': 'solvecaptcha.com',
'apiKey': api_key,
# 'callback': 'https://your.site/result-receiver', # If set, the solver will return only the `captchaId` without polling the API for the answer.
'defaultTimeout': 120,
'recaptchaTimeout': 600,
'pollingInterval': 10,
}
solver = Solvecaptcha(**config)
try:
result = solver.hcaptcha(
sitekey='bf8ccfbf-6a05-45f6-982a-7a7964c2f50c',
url='https://portalunico.siscomex.gov.br',
invisible=0,
domain="hcaptcha.com",
# proxy={
# 'type': 'HTTPS',
# 'uri': 'login:password@IP_address:PORT'
# }
)
except Exception as e:
sys.exit(e)
else:
sys.exit('result: ' + str(result))
Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 825 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

+32
View File
@@ -0,0 +1,32 @@
import sys
import os
sys.path.append(os.path.dirname(os.path.dirname(os.path.realpath(__file__))))
from solvecaptcha import Solvecaptcha
# In this example, we store the API key in environment variables, which can be set as follows:
# On Linux or macOS:
# export APIKEY_SOLVECAPTCHA=1abc234de56fab7c89012d34e56fa7b8
# On Windows:
# set APIKEY_SOLVECAPTCHA=1abc234de56fab7c89012d34e56fa7b8
# Alternatively, you can directly assign the API key to a variable:
# api_key = "1abc234de56fab7c89012d34e56fa7b8"
api_key = os.getenv('APIKEY_SOLVECAPTCHA', 'YOUR_API_KEY')
solver = Solvecaptcha(api_key)
try:
result = solver.keycaptcha(
s_s_c_user_id=184015,
s_s_c_session_id='e34ddd2c72e67593ac0b4ca8e4f44725',
s_s_c_web_server_sign='a5ebd41ae22348b2cdbdc211792e982d',
s_s_c_web_server_sign2='29255689423dd92990f8d06de50560d0',
url='https://mysite.com/page/with//keycaptcha')
except Exception as e:
sys.exit(e)
else:
sys.exit('result: ' + str(result))
+47
View File
@@ -0,0 +1,47 @@
import sys
import os
sys.path.append(os.path.dirname(os.path.dirname(os.path.realpath(__file__))))
from solvecaptcha import Solvecaptcha
# In this example, we store the API key in environment variables, which can be set as follows:
# On Linux or macOS:
# export APIKEY_SOLVECAPTCHA=1abc234de56fab7c89012d34e56fa7b8
# On Windows:
# set APIKEY_SOLVECAPTCHA=1abc234de56fab7c89012d34e56fa7b8
# Alternatively, you can directly assign the API key to a variable:
# api_key = "1abc234de56fab7c89012d34e56fa7b8"
api_key = os.getenv('APIKEY_SOLVECAPTCHA', 'YOUR_API_KEY')
config = {
'server': 'solvecaptcha.com',
'apiKey': api_key,
# 'callback': 'https://your.site/result-receiver', # If set, the solver will return only the `captchaId` without polling the API for the answer.
'defaultTimeout': 120,
'recaptchaTimeout': 600,
'pollingInterval': 10,
}
solver = Solvecaptcha(**config)
try:
result = solver.keycaptcha(s_s_c_user_id=184015,
s_s_c_session_id='e34ddd2c72e67593ac0b4ca8e4f44725',
s_s_c_web_server_sign='a5ebd41ae22348b2cdbdc211792e982d',
s_s_c_web_server_sign2='29255689423dd92990f8d06de50560d0',
url='https://mysite.com/page/with//keycaptcha',
# proxy = {'type': 'HTTPS',
# 'uri': 'login:password@IP_address:PORT'}
)
except Exception as e:
sys.exit(e)
else:
sys.exit('result: ' + str(result))
+27
View File
@@ -0,0 +1,27 @@
import sys
import os
sys.path.append(os.path.dirname(os.path.dirname(os.path.realpath(__file__))))
from solvecaptcha import Solvecaptcha
# In this example, we store the API key in environment variables, which can be set as follows:
# On Linux or macOS:
# export APIKEY_SOLVECAPTCHA=1abc234de56fab7c89012d34e56fa7b8
# On Windows:
# set APIKEY_SOLVECAPTCHA=1abc234de56fab7c89012d34e56fa7b8
# Alternatively, you can directly assign the API key to a variable:
# api_key = "1abc234de56fab7c89012d34e56fa7b8"
api_key = os.getenv('APIKEY_SOLVECAPTCHA', 'YOUR_API_KEY')
solver = Solvecaptcha(api_key)
try:
result = solver.normal('./images/normal.jpg')
except Exception as e:
sys.exit(e)
else:
sys.exit('result: ' + str(result))
+31
View File
@@ -0,0 +1,31 @@
import sys
import os
from base64 import b64encode
sys.path.append(os.path.dirname(os.path.dirname(os.path.realpath(__file__))))
from solvecaptcha import Solvecaptcha
# In this example, we store the API key in environment variables, which can be set as follows:
# On Linux or macOS:
# export APIKEY_SOLVECAPTCHA=1abc234de56fab7c89012d34e56fa7b8
# On Windows:
# set APIKEY_SOLVECAPTCHA=1abc234de56fab7c89012d34e56fa7b8
# Alternatively, you can directly assign the API key to a variable:
# api_key = "1abc234de56fab7c89012d34e56fa7b8"
api_key = os.getenv('APIKEY_SOLVECAPTCHA', 'YOUR_API_KEY')
solver = Solvecaptcha(api_key)
with open('./images/normal.jpg', 'rb') as f:
b64 = b64encode(f.read()).decode('utf-8')
try:
result = solver.normal(b64)
except Exception as e:
sys.exit(e)
else:
sys.exit('result: ' + str(result))
+38
View File
@@ -0,0 +1,38 @@
import sys
import os
sys.path.append(os.path.dirname(os.path.dirname(os.path.realpath(__file__))))
from solvecaptcha import Solvecaptcha
# In this example, we store the API key in environment variables, which can be set as follows:
# On Linux or macOS:
# export APIKEY_SOLVECAPTCHA=1abc234de56fab7c89012d34e56fa7b8
# On Windows:
# set APIKEY_SOLVECAPTCHA=1abc234de56fab7c89012d34e56fa7b8
# Alternatively, you can directly assign the API key to a variable:
# api_key = "1abc234de56fab7c89012d34e56fa7b8"
api_key = os.getenv('APIKEY_SOLVECAPTCHA', 'YOUR_API_KEY')
solver = Solvecaptcha(api_key, defaultTimeout=30, pollingInterval=5)
try:
result = solver.normal(
'./images/normal_2.jpg',
numeric=4,
minLen=4,
maxLen=20,
phrase=0,
caseSensitive=0,
calc=0,
lang='en',
# hintImg='./images/normal_hint.jpg',
# hintText='Type red symbols only',
)
except Exception as e:
sys.exit(e)
else:
sys.exit('result: ' + str(result))
+33
View File
@@ -0,0 +1,33 @@
import sys
import os
sys.path.append(os.path.dirname(os.path.dirname(os.path.realpath(__file__))))
from solvecaptcha import Solvecaptcha
# In this example, we store the API key in environment variables, which can be set as follows:
# On Linux or macOS:
# export APIKEY_SOLVECAPTCHA=1abc234de56fab7c89012d34e56fa7b8
# On Windows:
# set APIKEY_SOLVECAPTCHA=1abc234de56fab7c89012d34e56fa7b8
# Alternatively, you can directly assign the API key to a variable:
# api_key = "1abc234de56fab7c89012d34e56fa7b8"
api_key = os.getenv('APIKEY_SOLVECAPTCHA', 'YOUR_API_KEY')
solver = Solvecaptcha(api_key)
try:
result = solver.recaptcha(
sitekey='6LdO5_IbAAAAAAeVBL9TClS19NUTt5wswEb3Q7C5',
url='https://mysite.com/page/with/recaptcha-v2'
)
except Exception as e:
sys.exit(e)
else:
sys.exit('result: ' + str(result))
+46
View File
@@ -0,0 +1,46 @@
import sys
import os
sys.path.append(os.path.dirname(os.path.dirname(os.path.realpath(__file__))))
from solvecaptcha import Solvecaptcha
# In this example, we store the API key in environment variables, which can be set as follows:
# On Linux or macOS:
# export APIKEY_SOLVECAPTCHA=1abc234de56fab7c89012d34e56fa7b8
# On Windows:
# set APIKEY_SOLVECAPTCHA=1abc234de56fab7c89012d34e56fa7b8
# Alternatively, you can directly assign the API key to a variable:
# api_key = "1abc234de56fab7c89012d34e56fa7b8"
api_key = os.getenv('APIKEY_SOLVECAPTCHA', 'YOUR_API_KEY')
config = {
'server': 'solvecaptcha.com',
'apiKey': api_key,
# 'callback': 'https://your.site/result-receiver', # If set, the solver will return only the `captchaId` without polling the API for the answer.
'defaultTimeout': 120,
'recaptchaTimeout': 600,
'pollingInterval': 10,
}
solver = Solvecaptcha(**config)
try:
result = solver.recaptcha(
sitekey='6LdO5_IbAAAAAAeVBL9TClS19NUTt5wswEb3Q7C5',
url='https://mysite.com/page/with//recaptcha-v2-invisible',
invisible=1,
# header_acao=1,
# pingback="http://mysite.com/pingback/url/",
# proxy={'type': 'HTTPS',
# 'uri': 'login:password@IP_address:PORT'
# }
)
except Exception as e:
sys.exit(e)
else:
sys.exit('result: ' + str(result))
+31
View File
@@ -0,0 +1,31 @@
import sys
import os
sys.path.append(os.path.dirname(os.path.dirname(os.path.realpath(__file__))))
from solvecaptcha import Solvecaptcha
# In this example, we store the API key in environment variables, which can be set as follows:
# On Linux or macOS:
# export APIKEY_SOLVECAPTCHA=1abc234de56fab7c89012d34e56fa7b8
# On Windows:
# set APIKEY_SOLVECAPTCHA=1abc234de56fab7c89012d34e56fa7b8
# Alternatively, you can directly assign the API key to a variable:
# api_key = "1abc234de56fab7c89012d34e56fa7b8"
api_key = os.getenv('APIKEY_SOLVECAPTCHA', 'YOUR_API_KEY')
solver = Solvecaptcha(api_key)
try:
result = solver.recaptcha(
sitekey='6LfdxboZAAAAAMtnONIt4DJ8J1t4wMC-kVG02zIO',
url='https://mysite.com/page/with//recaptcha-v3',
action='login',
version='v3')
except Exception as e:
sys.exit(e)
else:
sys.exit('result: ' + str(result))
+46
View File
@@ -0,0 +1,46 @@
import sys
import os
sys.path.append(os.path.dirname(os.path.dirname(os.path.realpath(__file__))))
from solvecaptcha import Solvecaptcha
# In this example, we store the API key in environment variables, which can be set as follows:
# On Linux or macOS:
# export APIKEY_SOLVECAPTCHA=1abc234de56fab7c89012d34e56fa7b8
# On Windows:
# set APIKEY_SOLVECAPTCHA=1abc234de56fab7c89012d34e56fa7b8
# Alternatively, you can directly assign the API key to a variable:
# api_key = "1abc234de56fab7c89012d34e56fa7b8"
api_key = os.getenv('APIKEY_SOLVECAPTCHA', 'YOUR_API_KEY')
config = {
'server': 'solvecapcha.com',
'apiKey': api_key,
# 'callback': 'https://your.site/result-receiver', # If set, the solver will return only the `captchaId` without polling the API for the answer.
'defaultTimeout': 120,
'recaptchaTimeout': 600,
'pollingInterval': 10,
}
solver = Solvecaptcha(**config)
try:
result = solver.recaptcha(
sitekey='6LfdxboZAAAAAMtnONIt4DJ8J1t4wMC-kVG02zIO',
url='https://mysite.com/page/with//recaptcha-v3',
version='v3',
action='verify',
# proxy={
# 'type': 'HTTPS',
# 'uri': 'login:password@IP_address:PORT'
# }
)
except Exception as e:
sys.exit(e)
else:
sys.exit('result: ' + str(result))
+27
View File
@@ -0,0 +1,27 @@
import sys
import os
sys.path.append(os.path.dirname(os.path.dirname(os.path.realpath(__file__))))
from solvecaptcha import Solvecaptcha
# In this example, we store the API key in environment variables, which can be set as follows:
# On Linux or macOS:
# export APIKEY_SOLVECAPTCHA=1abc234de56fab7c89012d34e56fa7b8
# On Windows:
# set APIKEY_SOLVECAPTCHA=1abc234de56fab7c89012d34e56fa7b8
# Alternatively, you can directly assign the API key to a variable:
# api_key = "1abc234de56fab7c89012d34e56fa7b8"
api_key = os.getenv('APIKEY_SOLVECAPTCHA', 'YOUR_API_KEY')
solver = Solvecaptcha(api_key)
try:
result = solver.rotate('./images/rotate.jpg')
except Exception as e:
sys.exit(e)
else:
sys.exit('result: ' + str(result))
+32
View File
@@ -0,0 +1,32 @@
import sys
import os
sys.path.append(os.path.dirname(os.path.dirname(os.path.realpath(__file__))))
from solvecaptcha import Solvecaptcha
# In this example, we store the API key in environment variables, which can be set as follows:
# On Linux or macOS:
# export APIKEY_SOLVECAPTCHA=1abc234de56fab7c89012d34e56fa7b8
# On Windows:
# set APIKEY_SOLVECAPTCHA=1abc234de56fab7c89012d34e56fa7b8
# Alternatively, you can directly assign the API key to a variable:
# api_key = "1abc234de56fab7c89012d34e56fa7b8"
api_key = os.getenv('APIKEY_SOLVECAPTCHA', 'YOUR_API_KEY')
solver = Solvecaptcha(api_key, defaultTimeout=100, pollingInterval=10)
try:
result = solver.rotate(
'./images/rotate.jpg',
angle=40,
lang='en',
# hintImg = 'images/rotate_hint.jpg'
hintText='Put the images in the correct way up')
except Exception as e:
sys.exit(e)
else:
sys.exit('result: ' + str(result))
+28
View File
@@ -0,0 +1,28 @@
import sys
import os
sys.path.append(os.path.dirname(os.path.dirname(os.path.realpath(__file__))))
from solvecaptcha import Solvecaptcha
# In this example, we store the API key in environment variables, which can be set as follows:
# On Linux or macOS:
# export APIKEY_SOLVECAPTCHA=1abc234de56fab7c89012d34e56fa7b8
# On Windows:
# set APIKEY_SOLVECAPTCHA=1abc234de56fab7c89012d34e56fa7b8
# Alternatively, you can directly assign the API key to a variable:
# api_key = "1abc234de56fab7c89012d34e56fa7b8"
api_key = os.getenv('APIKEY_SOLVECAPTCHA', 'YOUR_API_KEY')
solver = Solvecaptcha(api_key)
try:
result = solver.text('If tomorrow is Saturday, what day is today?')
except Exception as e:
sys.exit(e)
else:
print(result)
sys.exit('result: ' + str(result))
+28
View File
@@ -0,0 +1,28 @@
import sys
import os
sys.path.append(os.path.dirname(os.path.dirname(os.path.realpath(__file__))))
from solvecaptcha import Solvecaptcha
# In this example, we store the API key in environment variables, which can be set as follows:
# On Linux or macOS:
# export APIKEY_SOLVECAPTCHA=1abc234de56fab7c89012d34e56fa7b8
# On Windows:
# set APIKEY_SOLVECAPTCHA=1abc234de56fab7c89012d34e56fa7b8
# Alternatively, you can directly assign the API key to a variable:
# api_key = "1abc234de56fab7c89012d34e56fa7b8"
api_key = os.getenv('APIKEY_SOLVECAPTCHA', 'YOUR_API_KEY')
solver = Solvecaptcha(api_key, defaultTimeout=50, pollingInterval=10)
try:
result = solver.text('If tomorrow is Saturday, what day is today?',
lang='en')
except Exception as e:
sys.exit(e)
else:
sys.exit('result: ' + str(result))
+33
View File
@@ -0,0 +1,33 @@
import sys
import os
sys.path.append(os.path.dirname(os.path.dirname(os.path.realpath(__file__))))
from solvecaptcha import Solvecaptcha
# In this example, we store the API key in environment variables, which can be set as follows:
# On Linux or macOS:
# export APIKEY_SOLVECAPTCHA=1abc234de56fab7c89012d34e56fa7b8
# On Windows:
# set APIKEY_SOLVECAPTCHA=1abc234de56fab7c89012d34e56fa7b8
# Alternatively, you can directly assign the API key to a variable:
# api_key = "1abc234de56fab7c89012d34e56fa7b8"
api_key = os.getenv('APIKEY_SOLVECAPTCHA', 'YOUR_API_KEY')
solver = Solvecaptcha(api_key)
try:
result = solver.turnstile(
sitekey='0x4AAAAAAAFhFmVSpJiMM20Z',
url='https://tvboom.net/packages/view/id/1/packages/view/id/1/',
useragent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36",
)
# {"sitekey":"0x4AAAAAAAFhFmVSpJiMM20Z","pageurl":"https:\/\/tvboom.net\/packages\/view\/id\/1\/packages\/view\/id\/1\/","pagedata":"","captchatype":"turnstile","data":"","action":"",","proxy":"","proxytype":"HTTP"}
except Exception as e:
sys.exit(e)
else:
sys.exit('result: ' + str(result))
+47
View File
@@ -0,0 +1,47 @@
import sys
import os
sys.path.append(os.path.dirname(os.path.dirname(os.path.realpath(__file__))))
from solvecaptcha import Solvecaptcha
# In this example, we store the API key in environment variables, which can be set as follows:
# On Linux or macOS:
# export APIKEY_SOLVECAPTCHA=1abc234de56fab7c89012d34e56fa7b8
# On Windows:
# set APIKEY_SOLVECAPTCHA=1abc234de56fab7c89012d34e56fa7b8
# Alternatively, you can directly assign the API key to a variable:
# api_key = "1abc234de56fab7c89012d34e56fa7b8"
api_key = os.getenv('APIKEY_SOLVECAPTCHA', 'YOUR_API_KEY')
config = {
'server': 'solvecaptcha.com',
'apiKey': api_key,
# 'callback': 'https://your.site/result-receiver', # If set, the solver will return only the `captchaId` without polling the API for the answer.
'defaultTimeout': 120,
'recaptchaTimeout': 600,
'pollingInterval': 10,
}
solver = Solvecaptcha(**config)
try:
result = solver.turnstile(sitekey='0x4AAAAAAADnPIDROrmt1LDg',
url='https://dexscreener.com/',
data="8ffc47422ae4e297",
pagedata="JD.BAzfWHWAX2ZIXTgOkwU7SIJIXB3TYI6x0fplCxPo-1736508032-1.3.1.1-2Qy7twd2XO5laG9G6QrjYSQ.g3LszfU1A1osszzbbz.EHIJLRM4lHyZMnyTex7nIl7U8xVZrb99.lVWJ6RSSWG.0x_95kiDv.kqnQACTDl072eVFdyd1IRA.3SJsKl0ptevnsQx6pShakPgm2HWX65d5Jv.CDvbLLPSDz1SJk35ULnsY0fC9B_7NfgjEai5D2sYdYx5XxIIOOrQLkOHD963SqC6DQu9VXq09o8qlWsjHEORy_4VOsxf.7hjBw9y3Auziyh7ISo2mgAEHqCnYMjJtyLDqc4CGSnmYBRvSGMj96KvTLfSx2PCNxwWpUiEHb1WcM9Y1zjyz6.JVos.mjx5MDQ3UADASMJbtdWHMpH0yDfiDgtWNpxW1F.chfJ.q5MhSip4lLAXMVYLMDi.10C0pjIhwOHM0tuFhbyjAoq7MOfvL9t0sNQLKlrk1RUayK6alVy2Y0Zf1BH4p7lOSPQ",
action="managed",
useragent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36",
# proxy={
# 'type': 'HTTPS',
# 'uri': 'login:password@IP_address:PORT'
# }
)
except Exception as e:
sys.exit(e)
else:
sys.exit('result: ' + str(result))