This commit is contained in:
solvecaptcha-com
2025-09-23 11:11:15 +03:00
parent df4255dafb
commit 1cce37a6c2
6 changed files with 4 additions and 177 deletions
+3 -24
View File
@@ -20,7 +20,6 @@ To get started quickly, check out the [Captcha Solver API](https://solvecaptcha.
### Helpful links:
- [reCAPTCHA v2 solver (Python + Selenium)](https://solvecaptcha.com/captcha-solver/recaptcha-v2-solver-bypass)
- [reCAPTCHA v3 solver](https://solvecaptcha.com/captcha-solver/recaptcha-v3-solver-bypass)
- [hCaptcha solver (Playwright-ready)](https://solvecaptcha.com/captcha-solver/hcaptcha-solver-bypass)
- [Text & Image captcha solver (Base64 / file input)]()
- [Cloudflare captcha / Turnstile solver](https://solvecaptcha.com/captcha-solver/cloudflare-captcha-solver-bypass)
- [Amazon captcha (WAF & login forms)](https://solvecaptcha.com/captcha-solver/amazon-captcha-solver-bypass)
@@ -57,7 +56,6 @@ Need help integrating with your Python app or automation tools? [Open an issue](
- [Text Captcha](#text-captcha)
- [reCAPTCHA v2](#recaptcha-v2)
- [reCAPTCHA v3](#recaptcha-v3)
- [hCaptcha](#hcaptcha)
- [FunCaptcha](#funcaptcha)
- [GeeTest](#geetest)
- [GeeTest v4](#geetest-v4)
@@ -207,24 +205,6 @@ result = solver.recaptcha(sitekey='6Le-wvkSVVABCPBMRTvw0Q4Muexq1bi0DJwx_mJ-',
param1=..., ...)
```
### hCaptcha
<sup>[API method description.](https://solvecaptcha.com/captcha-solver-api#solving_hcaptcha)</sup>
Use the following method to solve hCaptcha and retrieve a token for bypassing the protection.
```python
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'
# }
)
```
### FunCaptcha
<sup>[API method description.](https://solvecaptcha.com/captcha-solver-api#solving_funcaptcha_new)</sup>
@@ -401,7 +381,7 @@ except TimeoutException as e:
## Proxies
You can provide your proxy as an additional argument for the following methods: reCAPTCHA, FunCaptcha, GeeTest, GeeTest v4, KeyCaptcha, hCaptcha, Turnstile, Amazon WAF, and other captchas.
You can provide your proxy as an additional argument for the following methods: reCAPTCHA, FunCaptcha, GeeTest, GeeTest v4, KeyCaptcha, Turnstile, Amazon WAF, and other captchas.
The proxy will be passed to the API to facilitate captcha solving.
@@ -442,12 +422,11 @@ Examples of solving all supported captcha types can be found in the [examples] d
## Examples using Selenium
We also have a separate repository where you can find examples of captcha solving using the [Selenium](https://pypi.org/project/selenium/) \ [seleniumbase](https://seleniumbase.io/) library.
- [Python hCaptcha Solver: Bypass hCaptcha with Proxy using Selenium and SolveCaptcha SDK](https://github.com/solvercaptcha/hcaptcha-solver-seleniumbase-python)
## Useful articles
- [Solve and bypass Google reCAPTCHA, hCaptcha, Image CAPTCHA, Cloudflare Challenge and any captcha in Selenium with captcha solver.](https://solvecaptcha.com/captcha-solver/selenium-captcha-solver-bypass)
- [Solve and bypass Google reCAPTCHA, hCaptcha, Arkose FunCaptcha, Cloudflare Turnstile, and any captcha in Puppeteer with captcha solver.](https://solvecaptcha.com/captcha-solver/puppeteer-captcha-solver-bypass)
- [Solve and bypass Google reCAPTCHA, Image CAPTCHA, Cloudflare Challenge and any captcha in Selenium with captcha solver.](https://solvecaptcha.com/captcha-solver/selenium-captcha-solver-bypass)
- [Solve and bypass Google reCAPTCHA, Arkose FunCaptcha, Cloudflare Turnstile, and any captcha in Puppeteer with captcha solver.](https://solvecaptcha.com/captcha-solver/puppeteer-captcha-solver-bypass)
## Get in touch
-34
View File
@@ -1,34 +0,0 @@
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
@@ -1,49 +0,0 @@
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))
+1 -2
View File
@@ -35,7 +35,6 @@ setup(name='solvecaptcha-python',
keywords=[
'solvecaptcha', 'captcha', 'api', 'captcha solver', 'reCAPTCHA',
'FunCaptcha', 'Geetest', 'image captcha', 'Coordinates', 'Click Captcha',
'Geetest V4', 'Lemin captcha', 'Amazon WAF', 'Cloudflare Turnstile',
'hcaptcha'],
'Geetest V4', 'Lemin captcha', 'Amazon WAF', 'Cloudflare Turnstile'],
python_requires='>=3.6',
test_suite='tests')
-30
View File
@@ -101,36 +101,6 @@ class Solvecaptcha():
result = self.solve(timeout=self.recaptcha_timeout, **params)
return result
def hcaptcha(self, sitekey, url, **kwargs):
'''Wrapper for solving hcaptcha.
Parameters
__________
sitekey : str
Value of data-sitekey parameter you found on page.
url : str
Full URL of the page where you bypass the captcha.
invisible : num, optional
Use 1 for invisible version of hcaptcha. Currently it is a very rare case.
Default: 0.
data : str, optional
Custom data that is used in some implementations of hCaptcha, mostly with invisible=1. In most cases you see
it as rqdata inside network requests. Format: "data": "rqDataValue".
domain : str, optional
Domain used to load the captcha: hcaptcha.com or js.hcaptcha.com. Default: hcaptcha.com.
callback : str, optional
URL for pingback (callback) response that will be sent when captcha is solved. URL should be registered on
the server. More info here https://solvecaptcha.com/captcha-solver-api#manage_pingback.
proxy : dict, optional
{'type': 'HTTPS', 'uri': 'login:password@IP_address:PORT'}.
'''
result = self.solve(sitekey=sitekey,
url=url,
method='hcaptcha',
**kwargs)
return result
def turnstile(self, sitekey, url, **kwargs):
'''Wrapper for solving Cloudflare Turnstile.
-38
View File
@@ -1,38 +0,0 @@
#!/usr/bin/env python3
import unittest
try:
from .abstract import AbstractTest
except ImportError:
from abstract import AbstractTest
class HcaptchaTest(AbstractTest):
def test_all_params(self):
params = {
'sitekey' : 'f1ab2cdefa3456789012345b6c78d90e',
'url' : 'https://www.site.com/page/',
}
sends = {
'method' : 'hcaptcha',
'sitekey' : 'f1ab2cdefa3456789012345b6c78d90e',
'pageurl' : 'https://www.site.com/page/',
}
return self.send_return(sends, self.solver.hcaptcha, **params)
if __name__ == '__main__':
unittest.main()