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
+24-21Lines changed: 24 additions & 21 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
# Python Module for 2Captcha API
2
-
The easiest way to quickly integrate [2Captcha] captchasolving service into your code to automate solving of any types of captcha.
2
+
The easiest way to quickly integrate the 2Captcha captcha-solving service into your code and automate the solving of any type of captcha.
3
3
4
4
-[Python Module for 2Captcha API](#python-module-for-2captcha-api)
5
5
-[Installation](#installation)
@@ -10,8 +10,8 @@ The easiest way to quickly integrate [2Captcha] captcha solving service into you
10
10
-[Normal Captcha](#normal-captcha)
11
11
-[Audio Captcha](#audio-captcha)
12
12
-[Text Captcha](#text-captcha)
13
-
-[ReCaptcha v2](#recaptcha-v2)
14
-
-[ReCaptcha v3](#recaptcha-v3)
13
+
-[reCAPTCHA v2](#recaptcha-v2)
14
+
-[reCAPTCHA v3](#recaptcha-v3)
15
15
-[FunCaptcha](#funcaptcha)
16
16
-[GeeTest](#geetest)
17
17
-[hCaptcha](#hcaptcha)
@@ -20,13 +20,14 @@ The easiest way to quickly integrate [2Captcha] captcha solving service into you
20
20
-[Cloudflare Turnstile](#cloudflare-turnstile)
21
21
-[Amazon WAF](#amazon-waf)
22
22
-[KeyCaptcha](#keycaptcha)
23
+
-[atbCAPTCHA](#atbcaptcha)
23
24
-[Capy](#capy)
24
25
-[Grid](#grid)
25
26
-[Canvas](#canvas)
26
27
-[ClickCaptcha](#clickcaptcha)
27
28
-[Rotate](#rotate)
28
29
-[MTCaptcha](#mtcaptcha)
29
-
-[Friendly Captcha](#friendly_captcha)
30
+
-[Friendly Captcha](#friendly-captcha)
30
31
-[Cutcaptcha](#cutcaptcha)
31
32
-[Other methods](#other-methods)
32
33
-[send / getResult](#send--getresult)
@@ -52,7 +53,7 @@ from twocaptcha import TwoCaptcha
52
53
53
54
solver = TwoCaptcha('YOUR_API_KEY')
54
55
```
55
-
Also there are few options that can be configured:
56
+
Also there are a few options that can be configured:
56
57
57
58
```python
58
59
config = {
@@ -74,8 +75,8 @@ solver = TwoCaptcha(**config)
74
75
| server |`2captcha.com`| API server. You can set it to `rucaptcha.com` if your account is registered there |
75
76
| softId | - | your software ID obtained after publishing in [2captcha sofware catalog]|
76
77
| callback | - | URL of your web-sever that receives the captcha recognition result. The URl should be first registered in [pingback settings] of your account |
77
-
| defaultTimeout | 120 | Polling timeout in seconds for all captcha types except ReCaptcha. Defines how long the module tries to get the answer from `res.php` API endpoint |
78
-
| recaptchaTimeout | 600 | Polling timeout for ReCaptcha in seconds. Defines how long the module tries to get the answer from `res.php` API endpoint |
78
+
| defaultTimeout | 120 | Polling timeout in seconds for all captcha types except reCAPTCHA. Defines how long the module tries to get the answer from `res.php` API endpoint |
79
+
| recaptchaTimeout | 600 | Polling timeout for reCAPTCHA in seconds. Defines how long the module tries to get the answer from `res.php` API endpoint |
79
80
| pollingInterval | 10 | Interval in seconds between requests to `res.php` API endpoint, setting values less than 5 seconds is not recommended |
80
81
81
82
> **IMPORTANT:** once `callback` is defined for `TwoCaptcha` instance, all methods return only the captcha ID and DO NOT poll the API to get the result. The result will be sent to the callback URL.
@@ -100,7 +101,7 @@ When you submit any image-based captcha use can provide additional options to he
100
101
Below you can find basic examples for every captcha type. Check out [examples directory] to find more examples with all available options.
101
102
102
103
### Normal Captcha
103
-
To bypass a normal captcha (distorted text on image) use the following method. This method also can be used to recognize any text on the image.
104
+
To bypass a normal captcha (distorted text on an image) use the following method. This method also can be used to recognize any text on the image.
104
105
```python
105
106
result = solver.normal('path/to/captcha.jpg', param1=..., ...)
106
107
# OR
@@ -109,7 +110,7 @@ result = solver.normal('https://site-with-captcha.com/path/to/captcha.jpg', para
109
110
110
111
### Audio Captcha
111
112
To bypass an audio captcha (mp3 formats only) use the following method.
112
-
You must provife the language as`lang = 'en'`. Supported languages are "en", "ru", "de", "el", "pt".
113
+
You must provide the language as `lang = 'en'`. Supported languages are "en", "ru", "de", "el", "pt".
113
114
114
115
```python
115
116
result = solver.audio('path/to/captcha.mp3', lang='lang', param1=..., ...)
@@ -118,21 +119,21 @@ result = solver.audio('https://site-with-captcha.com/path/to/captcha.mp3', lang
118
119
```
119
120
120
121
### Text Captcha
121
-
This method can be used to bypass a captcha that requires to answer a question provided in clear text.
122
+
This method can be used to bypass a captcha that requires answering a question provided in clear text.
122
123
```python
123
124
result = solver.text('If tomorrow is Saturday, what day is today?', param1=..., ...)
124
125
```
125
126
126
-
### ReCaptcha v2
127
-
Use this method to solve ReCaptcha V2 and obtain a token to bypass the protection.
127
+
### reCAPTCHA v2
128
+
Use this method to solve reCAPTCHA V2 and obtain a token to bypass the protection.
128
129
```python
129
130
result = solver.recaptcha(sitekey='6Le-wvkSVVABCPBMRTvw0Q4Muexq1bi0DJwx_mJ-',
130
131
url='https://mysite.com/page/with/recaptcha',
131
132
param1=..., ...)
132
133
```
133
134
134
-
### ReCaptcha v3
135
-
This method provides ReCaptcha V3 solver and returns a token.
135
+
### reCAPTCHA v3
136
+
This method provides a reCAPTCHA V3 solver and returns a token.
136
137
```python
137
138
result = solver.recaptcha(sitekey='6Le-wvkSVVABCPBMRTvw0Q4Muexq1bi0DJwx_mJ-',
138
139
url='https://mysite.com/page/with/recaptcha',
@@ -162,7 +163,7 @@ result = solver.geetest(gt='f1ab2cdefa3456789012345b6c78d90e',
162
163
163
164
164
165
### hCaptcha
165
-
Use this method to solve hCaptcha challenge. Returns a token to bypass captcha.
166
+
Use this method to solve the hCaptcha challenge. Returns a token to bypass the captcha.
166
167
```python
167
168
result = solver.hcaptcha(sitekey='10000000-ffff-ffff-ffff-000000000001',
168
169
url='https://www.site.com/page/',
@@ -181,7 +182,7 @@ result = solver.geetest_v4(captcha_id='e392e1d7fd421dc63325744d5a2b9c73',
181
182
182
183
183
184
### Lemin Cropped Captcha
184
-
Use this method to solve hCaptcha challenge. Returns JSON with answer containing the following values: answer, challenge_id.
185
+
Use this method to solve hCaptcha challenge. Returns JSON with an answer containing the following values: answer, challenge_id.
185
186
```python
186
187
result = solver.lemin(captcha_id='CROPPED_1abcd2f_a1234b567c890d12ef3a456bc78d901d',
187
188
div_id='lemin-cropped-captcha',
@@ -228,7 +229,7 @@ result = solver.keycaptcha(s_s_c_user_id=10,
228
229
229
230
230
231
### atbCAPTCHA
231
-
Use this method to solve atbCaptcha challenge. Returns a token to bypass captcha.
232
+
Use this method to solve atbCaptcha challenge. Returns a token to bypass the captcha.
232
233
```python
233
234
result = solver.atb_captcha(app_id='af25e409b33d722a95e56a230ff8771c',
234
235
api_server='https://cap.aisecurius.com',
@@ -247,17 +248,19 @@ result = solver.capy(sitekey='PUZZLE_Abc1dEFghIJKLM2no34P56q7rStu8v',
247
248
param1=..., ...)
248
249
```
249
250
### Grid
250
-
Grid method is originally called Old ReCaptcha V2 method. The method can be used to bypass any type of captcha where you can apply a grid on image and need to click specific grid boxes. Returns numbers of boxes.
251
+
Grid method was originally called the Old reCAPTCHA V2 method. The method can be used to bypass any type of captcha where you can apply a grid on an image and click specific grid boxes. Returns numbers of boxes.
251
252
```python
252
253
result = solver.grid('path/to/captcha.jpg', param1=..., ...)
253
254
```
255
+
254
256
### Canvas
255
-
Canvas method can be used when you need to draw a line around an object on image. Returns a set of points' coordinates to draw a polygon.
257
+
Canvas method can be used when you need to draw a line around an object on an image. Returns a set of points' coordinates to draw a polygon.
256
258
```python
257
259
result = solver.canvas('path/to/captcha.jpg', param1=..., ...)
258
260
```
261
+
259
262
### ClickCaptcha
260
-
ClickCaptcha method returns coordinates of points on captcha image. Can be used if you need to click on particular points on the image.
263
+
ClickCaptcha method returns coordinates of points on the captcha image. Can be used if you need to click on particular points in the image.
261
264
```python
262
265
result = solver.coordinates('path/to/captcha.jpg', param1=..., ...)
263
266
```
@@ -316,7 +319,7 @@ balance = solver.balance()
316
319
```
317
320
318
321
### report
319
-
Use this method to report good or bad captcha answer.
322
+
Use this method to report good or bad captcha answers.
0 commit comments