captchaai 2.0.0__tar.gz → 2.0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {captchaai-2.0.0 → captchaai-2.0.1}/PKG-INFO +2 -2
- {captchaai-2.0.0 → captchaai-2.0.1}/README.md +1 -1
- {captchaai-2.0.0 → captchaai-2.0.1}/captchaai/browser/scripts.py +4 -0
- {captchaai-2.0.0 → captchaai-2.0.1}/captchaai.egg-info/PKG-INFO +2 -2
- {captchaai-2.0.0 → captchaai-2.0.1}/pyproject.toml +1 -1
- {captchaai-2.0.0 → captchaai-2.0.1}/tests/test_browser.py +15 -0
- {captchaai-2.0.0 → captchaai-2.0.1}/LICENSE +0 -0
- {captchaai-2.0.0 → captchaai-2.0.1}/captchaai/__init__.py +0 -0
- {captchaai-2.0.0 → captchaai-2.0.1}/captchaai/async_client.py +0 -0
- {captchaai-2.0.0 → captchaai-2.0.1}/captchaai/browser/__init__.py +0 -0
- {captchaai-2.0.0 → captchaai-2.0.1}/captchaai/browser/adapter.py +0 -0
- {captchaai-2.0.0 → captchaai-2.0.1}/captchaai/browser/engine.py +0 -0
- {captchaai-2.0.0 → captchaai-2.0.1}/captchaai/browser/types.py +0 -0
- {captchaai-2.0.0 → captchaai-2.0.1}/captchaai/client.py +0 -0
- {captchaai-2.0.0 → captchaai-2.0.1}/captchaai/core/__init__.py +0 -0
- {captchaai-2.0.0 → captchaai-2.0.1}/captchaai/core/config.py +0 -0
- {captchaai-2.0.0 → captchaai-2.0.1}/captchaai/core/orchestrator.py +0 -0
- {captchaai-2.0.0 → captchaai-2.0.1}/captchaai/core/registry.py +0 -0
- {captchaai-2.0.0 → captchaai-2.0.1}/captchaai/core/result.py +0 -0
- {captchaai-2.0.0 → captchaai-2.0.1}/captchaai/exceptions.py +0 -0
- {captchaai-2.0.0 → captchaai-2.0.1}/captchaai/helpers/__init__.py +0 -0
- {captchaai-2.0.0 → captchaai-2.0.1}/captchaai/helpers/extract.py +0 -0
- {captchaai-2.0.0 → captchaai-2.0.1}/captchaai/helpers/image.py +0 -0
- {captchaai-2.0.0 → captchaai-2.0.1}/captchaai/helpers/params.py +0 -0
- {captchaai-2.0.0 → captchaai-2.0.1}/captchaai/helpers/retry.py +0 -0
- {captchaai-2.0.0 → captchaai-2.0.1}/captchaai/helpers/validation.py +0 -0
- {captchaai-2.0.0 → captchaai-2.0.1}/captchaai/py.typed +0 -0
- {captchaai-2.0.0 → captchaai-2.0.1}/captchaai/transport/__init__.py +0 -0
- {captchaai-2.0.0 → captchaai-2.0.1}/captchaai/transport/async_http.py +0 -0
- {captchaai-2.0.0 → captchaai-2.0.1}/captchaai/transport/base.py +0 -0
- {captchaai-2.0.0 → captchaai-2.0.1}/captchaai/transport/sync_http.py +0 -0
- {captchaai-2.0.0 → captchaai-2.0.1}/captchaai.egg-info/SOURCES.txt +0 -0
- {captchaai-2.0.0 → captchaai-2.0.1}/captchaai.egg-info/dependency_links.txt +0 -0
- {captchaai-2.0.0 → captchaai-2.0.1}/captchaai.egg-info/requires.txt +0 -0
- {captchaai-2.0.0 → captchaai-2.0.1}/captchaai.egg-info/top_level.txt +0 -0
- {captchaai-2.0.0 → captchaai-2.0.1}/setup.cfg +0 -0
- {captchaai-2.0.0 → captchaai-2.0.1}/tests/test_async_client.py +0 -0
- {captchaai-2.0.0 → captchaai-2.0.1}/tests/test_balance.py +0 -0
- {captchaai-2.0.0 → captchaai-2.0.1}/tests/test_client.py +0 -0
- {captchaai-2.0.0 → captchaai-2.0.1}/tests/test_exceptions.py +0 -0
- {captchaai-2.0.0 → captchaai-2.0.1}/tests/test_extract.py +0 -0
- {captchaai-2.0.0 → captchaai-2.0.1}/tests/test_orchestrator.py +0 -0
- {captchaai-2.0.0 → captchaai-2.0.1}/tests/test_registry.py +0 -0
- {captchaai-2.0.0 → captchaai-2.0.1}/tests/test_thread_limit.py +0 -0
- {captchaai-2.0.0 → captchaai-2.0.1}/tests/test_validation.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: captchaai
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.1
|
|
4
4
|
Summary: Official Python client for the CaptchaAI captcha-solving API.
|
|
5
5
|
Author-email: "Dev@Captchaai" <dev@captchaai.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -39,7 +39,7 @@ Dynamic: license-file
|
|
|
39
39
|
<a href="https://github.com/CaptchaAI/captchaai-python/blob/main/LICENSE"><img src="https://img.shields.io/badge/License-MIT-green.svg" alt="License" /></a>
|
|
40
40
|
</p>
|
|
41
41
|
|
|
42
|
-
CaptchaAI Python library (`v2.0.
|
|
42
|
+
CaptchaAI Python library (`v2.0.1`, Python `>=3.10`, typed via `py.typed`) — an official CAPTCHA solver and solving API client for reCAPTCHA v2/v3/Enterprise, Cloudflare Turnstile, Cloudflare Challenge, GeeTest v3, CaptchaFox, Friendly Captcha, Lemin, and image CAPTCHAs, with optional Playwright browser automation.
|
|
43
43
|
|
|
44
44
|
Call one method per captcha type; the SDK handles HTTP, polling, retries, and typed error mapping via a sans-IO generator engine.
|
|
45
45
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<a href="https://github.com/CaptchaAI/captchaai-python/blob/main/LICENSE"><img src="https://img.shields.io/badge/License-MIT-green.svg" alt="License" /></a>
|
|
9
9
|
</p>
|
|
10
10
|
|
|
11
|
-
CaptchaAI Python library (`v2.0.
|
|
11
|
+
CaptchaAI Python library (`v2.0.1`, Python `>=3.10`, typed via `py.typed`) — an official CAPTCHA solver and solving API client for reCAPTCHA v2/v3/Enterprise, Cloudflare Turnstile, Cloudflare Challenge, GeeTest v3, CaptchaFox, Friendly Captcha, Lemin, and image CAPTCHAs, with optional Playwright browser automation.
|
|
12
12
|
|
|
13
13
|
Call one method per captcha type; the SDK handles HTTP, polling, retries, and typed error mapping via a sans-IO generator engine.
|
|
14
14
|
|
|
@@ -344,6 +344,10 @@ INJECT_RECAPTCHA_JS: str = """
|
|
|
344
344
|
|
|
345
345
|
GET_TURNSTILE_PARAMS_JS: str = """
|
|
346
346
|
(() => {
|
|
347
|
+
// Full-page Cloudflare Challenge embeds an internal Turnstile widget; let cloudflare_challenge win.
|
|
348
|
+
if (window._cf_chl_opt || document.querySelector("#challenge-running, #challenge-form")) {
|
|
349
|
+
return [];
|
|
350
|
+
}
|
|
347
351
|
const results = [];
|
|
348
352
|
const seen = new Set();
|
|
349
353
|
const ua = navigator.userAgent;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: captchaai
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.1
|
|
4
4
|
Summary: Official Python client for the CaptchaAI captcha-solving API.
|
|
5
5
|
Author-email: "Dev@Captchaai" <dev@captchaai.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -39,7 +39,7 @@ Dynamic: license-file
|
|
|
39
39
|
<a href="https://github.com/CaptchaAI/captchaai-python/blob/main/LICENSE"><img src="https://img.shields.io/badge/License-MIT-green.svg" alt="License" /></a>
|
|
40
40
|
</p>
|
|
41
41
|
|
|
42
|
-
CaptchaAI Python library (`v2.0.
|
|
42
|
+
CaptchaAI Python library (`v2.0.1`, Python `>=3.10`, typed via `py.typed`) — an official CAPTCHA solver and solving API client for reCAPTCHA v2/v3/Enterprise, Cloudflare Turnstile, Cloudflare Challenge, GeeTest v3, CaptchaFox, Friendly Captcha, Lemin, and image CAPTCHAs, with optional Playwright browser automation.
|
|
43
43
|
|
|
44
44
|
Call one method per captcha type; the SDK handles HTTP, polling, retries, and typed error mapping via a sans-IO generator engine.
|
|
45
45
|
|
|
@@ -597,6 +597,21 @@ def test_playwright_html_fixtures_detect_extract_and_inject() -> None:
|
|
|
597
597
|
assert client.inject_on_page(page, sa_params[0], "tok-sa") is True
|
|
598
598
|
assert page.evaluate("() => window.saTok") == "tok-sa"
|
|
599
599
|
assert page.evaluate("() => document.querySelector('textarea[name=\"g-recaptcha-response\"]').value") == "tok-sa"
|
|
600
|
+
|
|
601
|
+
# Full-page Cloudflare Challenge with embedded Turnstile must resolve to cloudflare_challenge.
|
|
602
|
+
cf_embedded_html = """<!doctype html><body>
|
|
603
|
+
<div id="cf-shadow"></div>
|
|
604
|
+
<script>
|
|
605
|
+
window._cf_chl_opt = { cType: "managed" };
|
|
606
|
+
window.__captchaai_turnstiles = [{ sitekey: "0x4EmbeddedChallengeKey" }];
|
|
607
|
+
const sr = document.getElementById("cf-shadow").attachShadow({ mode: "open" });
|
|
608
|
+
const frame = document.createElement("iframe");
|
|
609
|
+
frame.src = "https://challenges.cloudflare.com/cdn-cgi/challenge-platform/h/b/turnstile/f/av0/rch/xyz/0x4EmbeddedChallengeKey/dark";
|
|
610
|
+
sr.appendChild(frame);
|
|
611
|
+
</script>
|
|
612
|
+
</body>"""
|
|
613
|
+
page.goto("data:text/html," + quote(cf_embedded_html), wait_until="load")
|
|
614
|
+
assert client.detect_captchas(page) == ["cloudflare_challenge"]
|
|
600
615
|
finally:
|
|
601
616
|
browser.close()
|
|
602
617
|
client.close()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|