You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+16-3Lines changed: 16 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
Examples of solving captchas using the Python programming language, and the [2captcha-python] and [Selenium] libraries.
4
4
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.
6
6
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).
7
7
8
8
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
@@ -213,16 +214,28 @@ Cloudflare is one of the most popular captcha types. Cloudflare has two types. F
213
214
214
215
-[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.
215
216
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.
217
218
218
219
#### Cloudflare Turnstile
219
220
220
221
Token-based Cloudflare Turnstile solution.
221
222
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.
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.
0 commit comments