turnstile_solver
turnstile_solver copied to clipboard
Python server to automatically solve Cloudflare Turnstile CAPTCHA with an average solving time of two seconds
Turnstile Solver
Python server to automatically solve Cloudflare Turnstile CAPTCHA with an average solving time of two seconds (counting with a fast internet connection).
PD: This repository was initially created for personal use. I've adjusted it for sharing, but it might still be slightly disorganized. Feel free to contribute, open issues, and request new features.
Table of Content
- Screenshots
- Install
- Patchright
- How to use
- Run server
- Global proxy
- Proxy parameters
- Proxy file
- Get Token
- Curl
- Python
- Docker
- Disclaimer
- Sponsor
- Donate
Screenshots
TODO: Update



Install
pip install git+https://github.com/odell0111/turnstile_solver@main
Install Patchright patched chrome browser
patchright install chrome
Note: You can also install chromium but chrome is recommended by Patchright
How to use
Run server
solver
solver --port 8088 --secret jWRN7DH6 --browser-position --max-attempts 3 --captcha-timeout 30 --page-load-timeout 30 --reload-on-overrun
Use global browser proxy
solver --proxy-server http://myproxy.com:3128 --proxy-username user --proxy-password pass
Load proxy parameters from environment variables (all caps)
solver --proxy-server MY_PROXY_SERVER --proxy-username MY_PROXY_USERNAME --proxy-password MY_PROXY_PASSWORD
Use a proxy from file per browser context
solver --proxies myproxies.txt
Get token
cURL
curl --location --request GET 'http://127.0.0.1:8088/solve' \
--header 'ngrok-skip-browser-warning: _' \
--header 'secret: jWRN7DH6' \
--header 'Content-Type: application/json' \
--data '{
"site_url": "https://spotifydown.com",
"site_key": "0x4AAAAAAAByvC31sFG0MSlp"
}'
Python
import requests
SERVER_URL = "http://127.0.0.1:8088"
url = f"{SERVER_URL}/solve"
headers = {
'ngrok-skip-browser-warning': '_',
'secret': 'jWRN7DH6',
'Content-Type': 'application/json'
}
json_data = {
"site_url": "https://spotifydown.com",
"site_key": "0x4AAAAAAAByvC31sFG0MSlp"
}
response = requests.get(
url=url,
headers=headers,
json=json_data,
)
response.raise_for_status()
data = response.json()
# {
# "elapsed": "2.641519",
# "message": null,
# "status": "OK",
# "token": "0.MwOLQ3dg..."
# }
token = data['token']
print("Token:", token)
🐳 Container Management Guide
goto ./docker/README.md
Disclaimer
Use this project entirely at your own risk. I hold no responsibility for any negative outcomes, including but not limited to API blocking and IP bans
Sponsor
Need to elevate your project? Try CapSolver, an industry-leading RPA (Robotic Process Automation) service. From Cloudflare's anti-bot systems to hCaptcha, reCAPTCHA, and more, CapSolver delivers unmatched accuracy and speed to tackle even the toughest challenges. Trusted by developers worldwide for seamless automation.

Donate
If you find my work useful and want to encourage further development, you can do so by donating
OxaPay
USDT (BEP20 - BSC)
0x88046e6d0f2bf8629cd7fbd754e4e275083fc993
USDT (SOL - Solana)
BL3QX5GtfXp8qha8PMLVwyud7gxB1aPE4Vsqotwscxsv
USDT (TRC20 - Tron)
TMpXigKBghRQmgYD53KyuxS38FH516ermu
BTC
1E9kw3FuaahfeproboNL7uvyBdjP9wY6CR
BTC (BEP20)
0x88046e6d0f2bf8629cd7fbd754e4e275083fc993
TON
UQCyCnWVYOmv97idVFZ4tIewToZacRhYVwfGNU658fN5w3Kl