|
1 | | -""" |
2 | | -Example: Solve a GeeTest v3 challenge with the async client. |
| 1 | +"""Example: Solve GeeTest v3 through your own proxy. |
| 2 | +
|
| 3 | +What it does: |
| 4 | + This example shows how to solve GeeTest v3 through your own proxy. It uses GeeTestTask and AsyncCaptchaClient.solve(), returning challenge, validate, and seccode values. |
| 5 | +
|
| 6 | +How it works: |
| 7 | + STEP-01 - Configure AsyncCaptchaClient with the API key. |
| 8 | + STEP-02 - Obtain the task parameters. Extract the GeeTest values from the target page, fetch a fresh challenge, and provide your proxy settings. |
| 9 | + STEP-03 - Create GeeTestTask and pass it to await solver.solve(task), which creates and polls the task. |
| 10 | + STEP-04 - Print challenge, validate, and seccode values. Applying the solution and verifying acceptance are target-specific. |
3 | 11 |
|
4 | 12 | Prerequisites: |
5 | 13 | Set the CAPTCHA_API_KEY environment variable. |
6 | 14 | Replace websiteURL, gt, and challenge with values from your target page. |
7 | 15 | Important: the challenge value is dynamic. Fetch a fresh one for each request. |
8 | 16 |
|
9 | | -NOTE: "https://target-site.com/path/to/geetest/init" below is a PLACEHOLDER, not a |
10 | | -real endpoint -- this script will not run end-to-end as-is. Replace it with a request |
11 | | -to your actual target page (or wherever it exposes a fresh `challenge` value) before |
12 | | -running this example. It's here only to illustrate where that fetch belongs in the flow. |
| 17 | + NOTE: "https://target-site.com/path/to/geetest/init" below is a PLACEHOLDER, not a |
| 18 | + real endpoint -- this script will not run end-to-end as-is. Replace it with a request |
| 19 | + to your actual target page (or wherever it exposes a fresh `challenge` value) before |
| 20 | + running this example. It's here only to illustrate where that fetch belongs in the flow. |
| 21 | + Replace the proxy placeholders with your own proxy settings. |
13 | 22 | """ |
14 | 23 |
|
15 | 24 | import asyncio |
|
0 commit comments