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
+27-8Lines changed: 27 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -34,10 +34,11 @@ The easiest way to quickly integrate the [2Captcha] captcha-solving service into
34
34
-[send / get_result](#send--get_result)
35
35
-[balance](#balance)
36
36
-[report](#report)
37
-
-[Error handling](#error-handling)
38
-
-[Proxies](#proxies)
39
-
-[Async calls](#async-calls)
37
+
-[Error handling](#error-handling)
38
+
-[Proxies](#proxies)
39
+
-[Async calls](#async-calls)
40
40
-[Examples](#examples)
41
+
-[Useful articles](#useful-articles)
41
42
42
43
## Installation
43
44
@@ -83,7 +84,9 @@ solver = TwoCaptcha(**config)
83
84
| recaptchaTimeout | 600 | Polling timeout for reCAPTCHA in seconds. Defines how long the module tries to get the answer from the `res.php` API endpoint |
84
85
| pollingInterval | 10 | Interval in seconds between requests to the `res.php` API endpoint. Setting values less than 5 seconds is not recommended |
85
86
86
-
> **IMPORTANT:** Once `callback` is defined for the `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.
87
+
> [!IMPORTANT]
88
+
> Once `callback` is defined for the `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.
89
+
87
90
To get the answer manually use [get_result method](#send--get_result)
88
91
89
92
## Solve captcha
@@ -355,6 +358,10 @@ result = solver.mtcaptcha(sitekey='MTPublic-KzqLY1cKH',
> To successfully use the received token, the captcha widget must not be loaded on the page. To do this, you need to abort request to `/friendlycaptcha/...module.min.js` on the page. When the captcha widget is already loaded on the page, there is a high probability that the received token will not work.
364
+
358
365
```python
359
366
result = solver.friendly_captcha(sitekey='FCMGEMUD2KTDSQ5H',
In case of an error, the captcha solver throws an exception. It's important to properly handle these cases. We recommend using `try except` to handle exceptions.
443
+
## Error handling
444
+
In case of an error, the captcha solver throws an exception. It's important to properly handle these cases. We recommend using `try except` to handle exceptions.
445
+
The list of all errors can be found in the [API documentation](https://2captcha.com/2captcha-api#list-of-inphp-errors).
432
446
```python
433
447
try:
434
448
result = solver.text('If tomorrow is Saturday, what day is today?')
@@ -447,7 +461,7 @@ except TimeoutException as e:
447
461
```
448
462
449
463
450
-
###Proxies
464
+
## Proxies
451
465
452
466
You can pass your proxy as an additional argument for the following methods: recaptcha, funcaptcha, geetest, geetest v4, hcaptcha,
0 commit comments