Solve Cloudflare challenges: get a cf_clearance cookie, matching User-Agent, and proxy for your own client. Official Python client for the RaptorWayz API.
Project description
raptorwayz (Python)
Solve Cloudflare challenges from Python. Get a valid cf_clearance cookie, the matching User-Agent,
and a proxy on the same exit IP, then make your own request with requests, httpx, or anything else.
Official Python client for RaptorWayz. Get an API key (5 free solves) there.
pip install raptorwayz
Usage
import requests
from raptorwayz import RaptorWayz
rw = RaptorWayz("bk_your_api_key")
c = rw.solve("example.com")
resp = requests.get(
"https://example.com/",
headers=c.headers, # {"User-Agent": "..."}
cookies=c.cookies, # {"cf_clearance": "..."}
proxies=c.proxies, # {"http": "...", "https": "..."}
)
print(resp.status_code) # 200
All three (cookie, User-Agent, and proxy) must be used together, or Cloudflare re-challenges.
With httpx
import httpx
from raptorwayz import RaptorWayz
c = RaptorWayz("bk_your_api_key").solve("example.com")
with httpx.Client(proxy=c.proxy, headers=c.headers, cookies=c.cookies) as client:
print(client.get("https://example.com/").status_code)
Errors
from raptorwayz import RaptorWayz, RaptorWayzError, NoChallenge
try:
c = RaptorWayz("bk_...").solve("example.com")
except NoChallenge as nc:
... # domain has no challenge, just use nc.proxy with a normal UA
except RaptorWayzError as e:
print(e.code, e.status, e.seconds_until_next) # e.g. "window_active", 429, 900
- Zero dependencies (stdlib only).
- Docs: https://raptorwayz.com/docs · OpenAPI: https://raptorwayz.com/openapi.json
MIT licensed. The client is open source; the hosted solving service is proprietary.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file raptorwayz-1.0.0.tar.gz.
File metadata
- Download URL: raptorwayz-1.0.0.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
84569d18019b4c42ddcad735f466a8d83e9183e89992f523eb7a26a9c666e89c
|
|
| MD5 |
642b9f3c6c55441419733549c1cf22bb
|
|
| BLAKE2b-256 |
51df43681c38f7a603c9c64974a678a4316f9d5b6dca9b8f6f21a9a59a811834
|
File details
Details for the file raptorwayz-1.0.0-py3-none-any.whl.
File metadata
- Download URL: raptorwayz-1.0.0-py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cefbbb2eeec00e81aacff942054f275992b55e023458b310ac7f315497038969
|
|
| MD5 |
0cc6a2407e11cb0d55f78f4ed36a4856
|
|
| BLAKE2b-256 |
f0f5b9ec101661c5247e5722531ed790dc4c54652f85d94c59112c6b09cf8adb
|