geetest-solver 1.0.8__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.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,3 @@
1
+ include captcha_solver/best.pt
2
+ include README.md
3
+ include LICENSE
@@ -0,0 +1,128 @@
1
+ Metadata-Version: 2.1
2
+ Name: geetest_solver
3
+ Version: 1.0.8
4
+ Summary: GeeTest v4 ICON CAPTCHA solver using YOLO + template matching
5
+ Home-page: https://github.com/syncrain/geetest-solver
6
+ Author: kv
7
+ License: UNKNOWN
8
+ Platform: UNKNOWN
9
+ Requires-Python: >=3.8
10
+ Description-Content-Type: text/markdown
11
+ Provides-Extra: interactive
12
+ License-File: LICENSE
13
+
14
+ # GeeTest Solver
15
+
16
+ Python library for solving GeeTest v4 captchas (ICON and MATCH/IconCrush types).
17
+
18
+ ## Installation
19
+
20
+ ```bash
21
+ pip install geetest-solver
22
+
23
+ ```
24
+
25
+ ## Usage
26
+
27
+ ### Synchronous
28
+
29
+ ```python
30
+ from geetest_solver import solve_captcha
31
+
32
+ # Icon captcha (default)
33
+ seccode = solve_captcha(captcha_id="<CAPTCHA_ID>", captcha_type="icon")
34
+
35
+ # Match/IconCrush captcha
36
+ seccode = solve_captcha(captcha_id="<CAPTCHA_ID>", captcha_type="match")
37
+
38
+ # With proxy
39
+ proxies = {
40
+ 'http': 'http://user:pass@proxy.example.com:8080',
41
+ 'https': 'http://user:pass@proxy.example.com:8080'
42
+ }
43
+ seccode = solve_captcha(
44
+ captcha_id="<CAPTCHA_ID>",
45
+ captcha_type="icon",
46
+ proxies=proxies
47
+ )
48
+ ```
49
+
50
+ ### Async (FastAPI, aiohttp, etc.)
51
+
52
+ ```python
53
+ from geetest_solver.async_wrapper import solve_captcha_async
54
+
55
+ # Icon captcha
56
+ seccode = await solve_captcha_async(captcha_id="<CAPTCHA_ID>", captcha_type="icon")
57
+
58
+ # Match captcha
59
+ seccode = await solve_captcha_async(captcha_id="<CAPTCHA_ID>", captcha_type="match")
60
+
61
+ # With proxy
62
+ proxies = {
63
+ 'http': 'http://user:pass@proxy.example.com:8080',
64
+ 'https': 'http://user:pass@proxy.example.com:8080'
65
+ }
66
+ seccode = await solve_captcha_async(
67
+ captcha_id="<CAPTCHA_ID>",
68
+ captcha_type="icon",
69
+ proxies=proxies
70
+ )
71
+ ```
72
+
73
+ ### FastAPI Example
74
+
75
+ ```python
76
+ from fastapi import FastAPI
77
+ from geetest_solver.async_wrapper import solve_captcha_async
78
+
79
+ app = FastAPI()
80
+
81
+ @app.post("/solve")
82
+ async def solve_captcha_endpoint(captcha_id: str):
83
+ result = await solve_captcha_async(captcha_id=captcha_id)
84
+ return {"seccode": result}
85
+ ```
86
+
87
+ ## Features
88
+
89
+ - **Icon captcha**: YOLO-based object detection + template matching
90
+ - **Match captcha**: Grid-based puzzle solver (swap to match 3)
91
+ - **Async support**: Non-blocking execution for FastAPI/async frameworks
92
+ - **Thread-safe**: No matplotlib global lock issues
93
+ - Automatic retry on failure
94
+ - Proxy support
95
+ - High success rate
96
+
97
+ ## Captcha Types
98
+
99
+ - `icon`: Click icons in sequence (uses YOLO model)
100
+ - `match`: Swap grid items to match 3 in a row (IconCrush)
101
+
102
+ ## Configuration
103
+
104
+ ### Disable Matplotlib (default)
105
+
106
+ Matplotlib is disabled by default to avoid global lock issues in multi-threaded environments. To enable for debugging:
107
+
108
+ ```bash
109
+ export ENABLE_MATPLOTLIB=1
110
+ ```
111
+
112
+ ### Disable YOLO Verbose Output
113
+
114
+ ```python
115
+ import os
116
+ os.environ['YOLO_VERBOSE'] = 'False'
117
+ ```
118
+
119
+ ## Requirements
120
+
121
+ - Python 3.8+
122
+ - CUDA (optional, for GPU acceleration)
123
+
124
+ ## License
125
+
126
+ MIT
127
+
128
+
@@ -0,0 +1,113 @@
1
+ # GeeTest Solver
2
+
3
+ Python library for solving GeeTest v4 captchas (ICON and MATCH/IconCrush types).
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ pip install geetest-solver
9
+
10
+ ```
11
+
12
+ ## Usage
13
+
14
+ ### Synchronous
15
+
16
+ ```python
17
+ from geetest_solver import solve_captcha
18
+
19
+ # Icon captcha (default)
20
+ seccode = solve_captcha(captcha_id="<CAPTCHA_ID>", captcha_type="icon")
21
+
22
+ # Match/IconCrush captcha
23
+ seccode = solve_captcha(captcha_id="<CAPTCHA_ID>", captcha_type="match")
24
+
25
+ # With proxy
26
+ proxies = {
27
+ 'http': 'http://user:pass@proxy.example.com:8080',
28
+ 'https': 'http://user:pass@proxy.example.com:8080'
29
+ }
30
+ seccode = solve_captcha(
31
+ captcha_id="<CAPTCHA_ID>",
32
+ captcha_type="icon",
33
+ proxies=proxies
34
+ )
35
+ ```
36
+
37
+ ### Async (FastAPI, aiohttp, etc.)
38
+
39
+ ```python
40
+ from geetest_solver.async_wrapper import solve_captcha_async
41
+
42
+ # Icon captcha
43
+ seccode = await solve_captcha_async(captcha_id="<CAPTCHA_ID>", captcha_type="icon")
44
+
45
+ # Match captcha
46
+ seccode = await solve_captcha_async(captcha_id="<CAPTCHA_ID>", captcha_type="match")
47
+
48
+ # With proxy
49
+ proxies = {
50
+ 'http': 'http://user:pass@proxy.example.com:8080',
51
+ 'https': 'http://user:pass@proxy.example.com:8080'
52
+ }
53
+ seccode = await solve_captcha_async(
54
+ captcha_id="<CAPTCHA_ID>",
55
+ captcha_type="icon",
56
+ proxies=proxies
57
+ )
58
+ ```
59
+
60
+ ### FastAPI Example
61
+
62
+ ```python
63
+ from fastapi import FastAPI
64
+ from geetest_solver.async_wrapper import solve_captcha_async
65
+
66
+ app = FastAPI()
67
+
68
+ @app.post("/solve")
69
+ async def solve_captcha_endpoint(captcha_id: str):
70
+ result = await solve_captcha_async(captcha_id=captcha_id)
71
+ return {"seccode": result}
72
+ ```
73
+
74
+ ## Features
75
+
76
+ - **Icon captcha**: YOLO-based object detection + template matching
77
+ - **Match captcha**: Grid-based puzzle solver (swap to match 3)
78
+ - **Async support**: Non-blocking execution for FastAPI/async frameworks
79
+ - **Thread-safe**: No matplotlib global lock issues
80
+ - Automatic retry on failure
81
+ - Proxy support
82
+ - High success rate
83
+
84
+ ## Captcha Types
85
+
86
+ - `icon`: Click icons in sequence (uses YOLO model)
87
+ - `match`: Swap grid items to match 3 in a row (IconCrush)
88
+
89
+ ## Configuration
90
+
91
+ ### Disable Matplotlib (default)
92
+
93
+ Matplotlib is disabled by default to avoid global lock issues in multi-threaded environments. To enable for debugging:
94
+
95
+ ```bash
96
+ export ENABLE_MATPLOTLIB=1
97
+ ```
98
+
99
+ ### Disable YOLO Verbose Output
100
+
101
+ ```python
102
+ import os
103
+ os.environ['YOLO_VERBOSE'] = 'False'
104
+ ```
105
+
106
+ ## Requirements
107
+
108
+ - Python 3.8+
109
+ - CUDA (optional, for GPU acceleration)
110
+
111
+ ## License
112
+
113
+ MIT
@@ -0,0 +1,6 @@
1
+ from .solver import solve_captcha
2
+ from .hybrid_solver import load_geetest_captcha, generate_w_parameter, submit_verify_request
3
+ from .iconcrush_solver import iconcrush_solve_all, generate_w_parameter_iconcrush
4
+
5
+ __version__ = "1.0.0"
6
+ __all__ = ["solve_captcha", "load_geetest_captcha", "generate_w_parameter", "submit_verify_request", "iconcrush_solve_all", "generate_w_parameter_iconcrush"]
@@ -0,0 +1,25 @@
1
+ """Async wrapper for geetest_solver"""
2
+ import asyncio
3
+ from concurrent.futures import ThreadPoolExecutor
4
+ from functools import partial
5
+
6
+ _executor = ThreadPoolExecutor(max_workers=4)
7
+
8
+ async def solve_captcha_async(captcha_id=None, captcha_type="icon", max_attempts=999,
9
+ interactive=False, proxies=None, verbose=False):
10
+ """Async wrapper for solve_captcha that runs in thread pool"""
11
+ from geetest_solver.solver import solve_captcha
12
+
13
+ loop = asyncio.get_event_loop()
14
+ func = partial(
15
+ solve_captcha,
16
+ captcha_id=captcha_id,
17
+ captcha_type=captcha_type,
18
+ max_attempts=max_attempts,
19
+ interactive=interactive,
20
+ proxies=proxies,
21
+ verbose=verbose
22
+ )
23
+
24
+ result = await loop.run_in_executor(_executor, func)
25
+ return result