Skip to content

Commit 3d472d3

Browse files
Update README.md
1 parent f6e314a commit 3d472d3

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

README.md

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Examples of solving captchas using the Python programming language, and the [2captcha-python] and [Selenium] libraries.
44

5-
This repository contains examples of automation of solving the most popular types of captcha, such as [reCAPTCHA][recaptcha-v2-demo], [Cloudflare Turnstile][cloudflare-turnstile], [normal captcha][normal-captcha-demo], [hCaptcha][hcaptcha-demo] and others. Selenium library is used for browser automation in the examples. The [2Captcha] service is used for solving captchas, therefore, for the correct work of the examples it is necessary to have an account in the [captcha solving service][2Captcha] service with a positive balance, or you can try to test it using [sandbox] mode to solve captchas manually.
5+
This repository contains examples of automation of solving the most popular types of captcha, such as [reCAPTCHA][recaptcha-v2-demo], [Cloudflare Turnstile][cloudflare-turnstile], [Cloudflare Challenge page][cloudflare-challenge], [normal captcha][normal-captcha-demo], [hCaptcha][hcaptcha-demo] and others. Selenium library is used for browser automation in the examples. The [2Captcha] service is used for solving captchas, therefore, for the correct work of the examples it is necessary to have an account in the [captcha solving service][2Captcha] service with a positive balance, or you can try to test it using [sandbox] mode to solve captchas manually.
66
Also, for `proxy` examples to work correctly, you need to have your own `proxy` and set it in the example code. The examples of captcha automation solving use captchas located on the [captchas demo pages](https://2captcha.com/demo).
77

88
We have our own proxies that we can offer you. [Buy residential proxies] to avoid restrictions and blocks. [Quick start].
@@ -28,6 +28,7 @@ Official 2Captcha webpage for [selenium captcha solver](https://2captcha.com/p/s
2828
- [hCaptcha + proxy](#hcaptcha--proxy)
2929
- [Cloudflare example](#cloudflare-example)
3030
- [Cloudflare Turnstile](#cloudflare-turnstile)
31+
- [Cloudflare Challenge page](#cloudflare-challenge-page)
3132
- [Text captcha example](#text-captcha-example)
3233
- [Normal captcha examples](#normal-captcha-examples)
3334
- [Normal captcha (screenshot)](#normal-captcha-screenshot)
@@ -213,16 +214,28 @@ Cloudflare is one of the most popular captcha types. Cloudflare has two types. F
213214

214215
- [Cloudflare challenge][cloudflare-challenge] - In this case, a redirect to the challenge page will occur to pass the captcha, as implemented here https://2captcha.com/demo/cloudflare-turnstile-challenge.
215216

216-
The approach to bypassing these two types is different, so you need to determine which type of Cloudflare you are facing. Read more about bypassing Cloudflare Turnstile type below.
217+
The approach to bypassing these two types is different, so you need to determine which type of Cloudflare you are facing. Read more about bypassing Cloudflare captcha types below.
217218

218219
#### Cloudflare Turnstile
219220

220221
Token-based Cloudflare Turnstile solution.
221222

222-
This example demonstrates how to bypass the Cloudflare Turnstile CAPTCHA located on the page https://2captcha.com/demo/cloudflare-turnstile. The Selenium library is used to automate browser actions and retrieve CAPTCHA parameters. To solve this type of Cloudflare CAPTCHA, it is necessary to send parameters such as pageurl and sitekey to the [2Captcha API](https://2captcha.com/2captcha-api#turnstile). After receiving the solution result (token), the script automatically uses the received answer on the page.
223+
This example demonstrates how to bypass the Cloudflare Turnstile CAPTCHA located on the page https://2captcha.com/demo/cloudflare-turnstile. The Selenium library is used to automate browser actions and retrieve CAPTCHA parameters. To solve this type of Cloudflare CAPTCHA, it is necessary to send parameters such as `pageurl` and `sitekey` to the [2Captcha API](https://2captcha.com/2captcha-api#turnstile). After receiving the solution result (token), the script automatically uses the received answer on the page.
223224

224225
**Source code:** [`./examples/cloudflare_turnstile/cloudflare_turnstile.py`](./examples/cloudflare_turnstile/cloudflare_turnstile.py)
225226

227+
228+
#### Cloudflare Challenge page
229+
230+
Token-based Cloudflare Challenge page solution.
231+
232+
This example demonstrates how to bypass the Cloudflare Challenge located on the page https://2captcha.com/demo/cloudflare-turnstile-challenge. The Selenium library is used to automate browser actions and retrieve CAPTCHA parameters. To solve this type of Cloudflare CAPTCHA, it is necessary to send parameters such as `pageurl`,`sitekey`, `action`, `data`, `pagedata`, `useragent` to the [2Captcha API](https://2captcha.com/2captcha-api#turnstile). After receiving the solution result (token), the script automatically uses the received answer on the page.
233+
234+
> [!NOTE]
235+
> When a web page first loads, some JavaScript functions and objects (such as `window.turnstile`) may already be initialized and executed. If the interception script is launched too late, this may lead to the fact that the necessary parameters will already be lost, or the script simply will not have time to intercept the right moment. Refreshing the page ensures that everything starts from scratch and you trigger the interception at the right time.
236+
237+
**Source code:** [`./examples/cloudflare_challenge_page/cloudflare_challenge_page.py`](./examples/cloudflare_challenge_page/cloudflare_challenge_page.py)
238+
226239
### Text captcha example
227240

228241
Text captcha solutions.

0 commit comments

Comments
 (0)