2captcha-python 1.2.7__tar.gz → 1.2.8__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. {2captcha_python-1.2.7 → 2captcha_python-1.2.8/2captcha_python.egg-info}/PKG-INFO +43 -19
  2. 2captcha_python-1.2.7/README.md → 2captcha_python-1.2.8/PKG-INFO +57 -18
  3. 2captcha_python-1.2.7/2captcha_python.egg-info/PKG-INFO → 2captcha_python-1.2.8/README.md +37 -33
  4. {2captcha_python-1.2.7 → 2captcha_python-1.2.8}/setup.py +9 -0
  5. {2captcha_python-1.2.7 → 2captcha_python-1.2.8}/twocaptcha/__init__.py +1 -1
  6. {2captcha_python-1.2.7 → 2captcha_python-1.2.8}/2captcha_python.egg-info/SOURCES.txt +0 -0
  7. {2captcha_python-1.2.7 → 2captcha_python-1.2.8}/2captcha_python.egg-info/dependency_links.txt +0 -0
  8. {2captcha_python-1.2.7 → 2captcha_python-1.2.8}/2captcha_python.egg-info/requires.txt +0 -0
  9. {2captcha_python-1.2.7 → 2captcha_python-1.2.8}/2captcha_python.egg-info/top_level.txt +0 -0
  10. {2captcha_python-1.2.7 → 2captcha_python-1.2.8}/LICENSE +0 -0
  11. {2captcha_python-1.2.7 → 2captcha_python-1.2.8}/setup.cfg +0 -0
  12. {2captcha_python-1.2.7 → 2captcha_python-1.2.8}/tests/test_amazon_waf.py +0 -0
  13. {2captcha_python-1.2.7 → 2captcha_python-1.2.8}/tests/test_atb_captcha.py +0 -0
  14. {2captcha_python-1.2.7 → 2captcha_python-1.2.8}/tests/test_canvas.py +0 -0
  15. {2captcha_python-1.2.7 → 2captcha_python-1.2.8}/tests/test_capy.py +0 -0
  16. {2captcha_python-1.2.7 → 2captcha_python-1.2.8}/tests/test_coordinates.py +0 -0
  17. {2captcha_python-1.2.7 → 2captcha_python-1.2.8}/tests/test_cutcaptcha.py +0 -0
  18. {2captcha_python-1.2.7 → 2captcha_python-1.2.8}/tests/test_friendly_captcha.py +0 -0
  19. {2captcha_python-1.2.7 → 2captcha_python-1.2.8}/tests/test_funcaptcha.py +0 -0
  20. {2captcha_python-1.2.7 → 2captcha_python-1.2.8}/tests/test_geetest.py +0 -0
  21. {2captcha_python-1.2.7 → 2captcha_python-1.2.8}/tests/test_geetest_v4.py +0 -0
  22. {2captcha_python-1.2.7 → 2captcha_python-1.2.8}/tests/test_grid.py +0 -0
  23. {2captcha_python-1.2.7 → 2captcha_python-1.2.8}/tests/test_hcaptcha.py +0 -0
  24. {2captcha_python-1.2.7 → 2captcha_python-1.2.8}/tests/test_keycaptcha.py +0 -0
  25. {2captcha_python-1.2.7 → 2captcha_python-1.2.8}/tests/test_lemin.py +0 -0
  26. {2captcha_python-1.2.7 → 2captcha_python-1.2.8}/tests/test_mtcaptcha.py +0 -0
  27. {2captcha_python-1.2.7 → 2captcha_python-1.2.8}/tests/test_normal.py +0 -0
  28. {2captcha_python-1.2.7 → 2captcha_python-1.2.8}/tests/test_recaptcha.py +0 -0
  29. {2captcha_python-1.2.7 → 2captcha_python-1.2.8}/tests/test_rotate.py +0 -0
  30. {2captcha_python-1.2.7 → 2captcha_python-1.2.8}/tests/test_tencent.py +0 -0
  31. {2captcha_python-1.2.7 → 2captcha_python-1.2.8}/tests/test_text.py +0 -0
  32. {2captcha_python-1.2.7 → 2captcha_python-1.2.8}/tests/test_turnstile.py +0 -0
  33. {2captcha_python-1.2.7 → 2captcha_python-1.2.8}/twocaptcha/api.py +0 -0
  34. {2captcha_python-1.2.7 → 2captcha_python-1.2.8}/twocaptcha/solver.py +0 -0
@@ -1,20 +1,25 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: 2captcha-python
3
- Version: 1.2.7
3
+ Version: 1.2.8
4
4
  Summary: Python module for easy integration with 2Captcha API
5
5
  Home-page: https://github.com/2captcha/2captcha-python/
6
6
  Author: 2Captcha
7
7
  Author-email: info@2captcha.com
8
+ Keywords: 2captcha,captcha,api,captcha solver,reCAPTCHA,hCaptcha,FunCaptcha,Geetest,image captcha,Coordinates,Click Captcha,Geetest V4,Lemin captcha,Amazon WAF,Cloudflare Turnstile,Capy Puzzle,MTCaptcha,Friendly Captcha,Tencent
8
9
  Classifier: Programming Language :: Python :: 3
9
10
  Classifier: License :: OSI Approved :: MIT License
10
11
  Classifier: Operating System :: OS Independent
12
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
13
+ Classifier: Topic :: Scientific/Engineering :: Image Recognition
14
+ Classifier: Topic :: Utilities
15
+ Classifier: Intended Audience :: Developers
11
16
  Requires-Python: >=3.6
12
17
  Description-Content-Type: text/markdown
13
18
  License-File: LICENSE
14
19
  Requires-Dist: requests
15
20
 
16
21
  # Python Module for 2Captcha API
17
- The easiest way to quickly integrate the 2Captcha captcha-solving service into your code and automate the solving of any type of captcha.
22
+ The easiest way to quickly integrate the [2Captcha] captcha-solving service into your code and automate the solving of any type of captcha.
18
23
 
19
24
  - [Python Module for 2Captcha API](#python-module-for-2captcha-api)
20
25
  - [Installation](#installation)
@@ -29,8 +34,8 @@ The easiest way to quickly integrate the 2Captcha captcha-solving service into y
29
34
  - [reCAPTCHA v3](#recaptcha-v3)
30
35
  - [FunCaptcha](#funcaptcha)
31
36
  - [GeeTest](#geetest)
32
- - [hCaptcha](#hcaptcha)
33
37
  - [GeeTest v4](#geetest-v4)
38
+ - [hCaptcha](#hcaptcha)
34
39
  - [Lemin Cropped Captcha](#lemin-cropped-captcha)
35
40
  - [Cloudflare Turnstile](#cloudflare-turnstile)
36
41
  - [Amazon WAF](#amazon-waf)
@@ -49,10 +54,11 @@ The easiest way to quickly integrate the 2Captcha captcha-solving service into y
49
54
  - [send / get_result](#send--get_result)
50
55
  - [balance](#balance)
51
56
  - [report](#report)
52
- - [Error handling](#error-handling)
53
- - [Proxies](#proxies)
54
- - [Async calls](#async-calls)
57
+ - [Error handling](#error-handling)
58
+ - [Proxies](#proxies)
59
+ - [Async calls](#async-calls)
55
60
  - [Examples](#examples)
61
+ - [Useful articles](#useful-articles)
56
62
 
57
63
  ## Installation
58
64
 
@@ -89,16 +95,18 @@ solver = TwoCaptcha(**config)
89
95
 
90
96
  ### TwoCaptcha instance options
91
97
 
92
- | Option | Default value | Description |
93
- | ---------------- | -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
94
- | server | `2captcha.com` | API server. You can set it to `rucaptcha.com` if your account is registered there |
95
- | softId | - | your software ID obtained after publishing in [2captcha software catalog] |
96
- | callback | - | URL of your web server that receives the captcha recognition result. The URL should be first registered in [pingback settings] of your account |
98
+ | Option | Default value | Description |
99
+ | ---------------- | -------------- |--------------------------------------------------------------------------------------------------------------------------------------------------------|
100
+ | server | `2captcha.com` | API server. You can set it to `rucaptcha.com` if your account is registered there |
101
+ | softId | 4580 | your software ID obtained after publishing in [2captcha software catalog] |
102
+ | callback | - | URL of your web server that receives the captcha recognition result. The URL should be first registered in [pingback settings] of your account |
97
103
  | defaultTimeout | 120 | Polling timeout in seconds for all captcha types except reCAPTCHA. Defines how long the module tries to get the answer from the `res.php` API endpoint |
98
104
  | recaptchaTimeout | 600 | Polling timeout for reCAPTCHA in seconds. Defines how long the module tries to get the answer from the `res.php` API endpoint |
99
105
  | pollingInterval | 10 | Interval in seconds between requests to the `res.php` API endpoint. Setting values less than 5 seconds is not recommended |
100
106
 
101
- > **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.
107
+ > [!IMPORTANT]
108
+ > 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.
109
+
102
110
  To get the answer manually use [get_result method](#send--get_result)
103
111
 
104
112
  ## Solve captcha
@@ -234,7 +242,7 @@ result = solver.hcaptcha(sitekey='10000000-ffff-ffff-ffff-000000000001',
234
242
 
235
243
  <sup>[API method description.](https://2captcha.com/2captcha-api#lemin)</sup>
236
244
 
237
- Use this method to solve hCaptcha challenge. Returns JSON with an answer containing the following values: answer, challenge_id.
245
+ Use this method to solve the Lemin captcha. Returns JSON with an answer containing the following values: answer, challenge_id.
238
246
  ```python
239
247
  result = solver.lemin(captcha_id='CROPPED_1abcd2f_a1234b567c890d12ef3a456bc78d901d',
240
248
  div_id='lemin-cropped-captcha',
@@ -370,6 +378,10 @@ result = solver.mtcaptcha(sitekey='MTPublic-KzqLY1cKH',
370
378
  <sup>[API method description.](https://2captcha.com/2captcha-api#friendly-captcha)</sup>
371
379
 
372
380
  Friendly Captcha solving method. Returns a token.
381
+
382
+ > [!IMPORTANT]
383
+ > 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.
384
+
373
385
  ```python
374
386
  result = solver.friendly_captcha(sitekey='FCMGEMUD2KTDSQ5H',
375
387
  url='https://friendlycaptcha.com/demo',
@@ -430,20 +442,27 @@ code = solver.get_result(id)
430
442
  ```
431
443
 
432
444
  ### balance
445
+
446
+ <sup>[API method description.](https://2captcha.com/2captcha-api#additional-methods)</sup>
447
+
433
448
  Use this method to get your account's balance
434
449
  ```python
435
450
  balance = solver.balance()
436
451
  ```
437
452
 
438
453
  ### report
454
+
455
+ <sup>[API method description.](https://2captcha.com/2captcha-api#complain)</sup>
456
+
439
457
  Use this method to report good or bad captcha answers.
440
458
  ```python
441
459
  solver.report(id, True) # captcha solved correctly
442
460
  solver.report(id, False) # captcha solved incorrectly
443
461
  ```
444
462
 
445
- ### Error handling
446
- 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.
463
+ ## Error handling
464
+ 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.
465
+ The list of all errors can be found in the [API documentation](https://2captcha.com/2captcha-api#list-of-inphp-errors).
447
466
  ```python
448
467
  try:
449
468
  result = solver.text('If tomorrow is Saturday, what day is today?')
@@ -462,7 +481,7 @@ except TimeoutException as e:
462
481
  ```
463
482
 
464
483
 
465
- ### Proxies
484
+ ## Proxies
466
485
 
467
486
  You can pass your proxy as an additional argument for the following methods: recaptcha, funcaptcha, geetest, geetest v4, hcaptcha,
468
487
  keycaptcha, capy puzzle, lemin, atbcaptcha, turnstile, amazon waf, mtcaptcha, friendly captcha, cutcaptcha.
@@ -478,7 +497,7 @@ proxy={
478
497
  }
479
498
  ```
480
499
 
481
- ### Async calls
500
+ ## Async calls
482
501
  You can also make async calls with [asyncio], for example:
483
502
 
484
503
  ```python
@@ -500,9 +519,14 @@ captcha_result = asyncio.run(captchaSolver(image))
500
519
  ## Examples
501
520
  Examples of solving all supported captcha types are located in the [examples] directory.
502
521
 
503
- ### Useful links
522
+ ## Useful articles
523
+
524
+ - Amazon captcha solver: Code example for bypassing the [Amazon captcha](https://2captcha.com/blog/amazon-captcha-solving)
525
+ - [Captcha bypass in Selenium](https://2captcha.com/blog/captcha-bypass-in-selenium)
526
+
527
+ <!-- Shared links for README.md -->
504
528
  [2Captcha]: https://2captcha.com/
505
- [2captcha sofware catalog]: https://2captcha.com/software
529
+ [2captcha software catalog]: https://2captcha.com/software
506
530
  [pingback settings]: https://2captcha.com/setting/pingback
507
531
  [post options]: https://2captcha.com/2captcha-api#normal_post
508
532
  [list of supported languages]: https://2captcha.com/2captcha-api#language
@@ -1,5 +1,25 @@
1
+ Metadata-Version: 2.1
2
+ Name: 2captcha-python
3
+ Version: 1.2.8
4
+ Summary: Python module for easy integration with 2Captcha API
5
+ Home-page: https://github.com/2captcha/2captcha-python/
6
+ Author: 2Captcha
7
+ Author-email: info@2captcha.com
8
+ Keywords: 2captcha,captcha,api,captcha solver,reCAPTCHA,hCaptcha,FunCaptcha,Geetest,image captcha,Coordinates,Click Captcha,Geetest V4,Lemin captcha,Amazon WAF,Cloudflare Turnstile,Capy Puzzle,MTCaptcha,Friendly Captcha,Tencent
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: License :: OSI Approved :: MIT License
11
+ Classifier: Operating System :: OS Independent
12
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
13
+ Classifier: Topic :: Scientific/Engineering :: Image Recognition
14
+ Classifier: Topic :: Utilities
15
+ Classifier: Intended Audience :: Developers
16
+ Requires-Python: >=3.6
17
+ Description-Content-Type: text/markdown
18
+ License-File: LICENSE
19
+ Requires-Dist: requests
20
+
1
21
  # Python Module for 2Captcha API
2
- The easiest way to quickly integrate the 2Captcha captcha-solving service into your code and automate the solving of any type of captcha.
22
+ The easiest way to quickly integrate the [2Captcha] captcha-solving service into your code and automate the solving of any type of captcha.
3
23
 
4
24
  - [Python Module for 2Captcha API](#python-module-for-2captcha-api)
5
25
  - [Installation](#installation)
@@ -14,8 +34,8 @@ The easiest way to quickly integrate the 2Captcha captcha-solving service into y
14
34
  - [reCAPTCHA v3](#recaptcha-v3)
15
35
  - [FunCaptcha](#funcaptcha)
16
36
  - [GeeTest](#geetest)
17
- - [hCaptcha](#hcaptcha)
18
37
  - [GeeTest v4](#geetest-v4)
38
+ - [hCaptcha](#hcaptcha)
19
39
  - [Lemin Cropped Captcha](#lemin-cropped-captcha)
20
40
  - [Cloudflare Turnstile](#cloudflare-turnstile)
21
41
  - [Amazon WAF](#amazon-waf)
@@ -34,10 +54,11 @@ The easiest way to quickly integrate the 2Captcha captcha-solving service into y
34
54
  - [send / get_result](#send--get_result)
35
55
  - [balance](#balance)
36
56
  - [report](#report)
37
- - [Error handling](#error-handling)
38
- - [Proxies](#proxies)
39
- - [Async calls](#async-calls)
57
+ - [Error handling](#error-handling)
58
+ - [Proxies](#proxies)
59
+ - [Async calls](#async-calls)
40
60
  - [Examples](#examples)
61
+ - [Useful articles](#useful-articles)
41
62
 
42
63
  ## Installation
43
64
 
@@ -74,16 +95,18 @@ solver = TwoCaptcha(**config)
74
95
 
75
96
  ### TwoCaptcha instance options
76
97
 
77
- | Option | Default value | Description |
78
- | ---------------- | -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
79
- | server | `2captcha.com` | API server. You can set it to `rucaptcha.com` if your account is registered there |
80
- | softId | - | your software ID obtained after publishing in [2captcha software catalog] |
81
- | callback | - | URL of your web server that receives the captcha recognition result. The URL should be first registered in [pingback settings] of your account |
98
+ | Option | Default value | Description |
99
+ | ---------------- | -------------- |--------------------------------------------------------------------------------------------------------------------------------------------------------|
100
+ | server | `2captcha.com` | API server. You can set it to `rucaptcha.com` if your account is registered there |
101
+ | softId | 4580 | your software ID obtained after publishing in [2captcha software catalog] |
102
+ | callback | - | URL of your web server that receives the captcha recognition result. The URL should be first registered in [pingback settings] of your account |
82
103
  | defaultTimeout | 120 | Polling timeout in seconds for all captcha types except reCAPTCHA. Defines how long the module tries to get the answer from the `res.php` API endpoint |
83
104
  | 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
105
  | pollingInterval | 10 | Interval in seconds between requests to the `res.php` API endpoint. Setting values less than 5 seconds is not recommended |
85
106
 
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.
107
+ > [!IMPORTANT]
108
+ > 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.
109
+
87
110
  To get the answer manually use [get_result method](#send--get_result)
88
111
 
89
112
  ## Solve captcha
@@ -219,7 +242,7 @@ result = solver.hcaptcha(sitekey='10000000-ffff-ffff-ffff-000000000001',
219
242
 
220
243
  <sup>[API method description.](https://2captcha.com/2captcha-api#lemin)</sup>
221
244
 
222
- Use this method to solve hCaptcha challenge. Returns JSON with an answer containing the following values: answer, challenge_id.
245
+ Use this method to solve the Lemin captcha. Returns JSON with an answer containing the following values: answer, challenge_id.
223
246
  ```python
224
247
  result = solver.lemin(captcha_id='CROPPED_1abcd2f_a1234b567c890d12ef3a456bc78d901d',
225
248
  div_id='lemin-cropped-captcha',
@@ -355,6 +378,10 @@ result = solver.mtcaptcha(sitekey='MTPublic-KzqLY1cKH',
355
378
  <sup>[API method description.](https://2captcha.com/2captcha-api#friendly-captcha)</sup>
356
379
 
357
380
  Friendly Captcha solving method. Returns a token.
381
+
382
+ > [!IMPORTANT]
383
+ > 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.
384
+
358
385
  ```python
359
386
  result = solver.friendly_captcha(sitekey='FCMGEMUD2KTDSQ5H',
360
387
  url='https://friendlycaptcha.com/demo',
@@ -415,20 +442,27 @@ code = solver.get_result(id)
415
442
  ```
416
443
 
417
444
  ### balance
445
+
446
+ <sup>[API method description.](https://2captcha.com/2captcha-api#additional-methods)</sup>
447
+
418
448
  Use this method to get your account's balance
419
449
  ```python
420
450
  balance = solver.balance()
421
451
  ```
422
452
 
423
453
  ### report
454
+
455
+ <sup>[API method description.](https://2captcha.com/2captcha-api#complain)</sup>
456
+
424
457
  Use this method to report good or bad captcha answers.
425
458
  ```python
426
459
  solver.report(id, True) # captcha solved correctly
427
460
  solver.report(id, False) # captcha solved incorrectly
428
461
  ```
429
462
 
430
- ### Error handling
431
- 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.
463
+ ## Error handling
464
+ 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.
465
+ The list of all errors can be found in the [API documentation](https://2captcha.com/2captcha-api#list-of-inphp-errors).
432
466
  ```python
433
467
  try:
434
468
  result = solver.text('If tomorrow is Saturday, what day is today?')
@@ -447,7 +481,7 @@ except TimeoutException as e:
447
481
  ```
448
482
 
449
483
 
450
- ### Proxies
484
+ ## Proxies
451
485
 
452
486
  You can pass your proxy as an additional argument for the following methods: recaptcha, funcaptcha, geetest, geetest v4, hcaptcha,
453
487
  keycaptcha, capy puzzle, lemin, atbcaptcha, turnstile, amazon waf, mtcaptcha, friendly captcha, cutcaptcha.
@@ -463,7 +497,7 @@ proxy={
463
497
  }
464
498
  ```
465
499
 
466
- ### Async calls
500
+ ## Async calls
467
501
  You can also make async calls with [asyncio], for example:
468
502
 
469
503
  ```python
@@ -485,9 +519,14 @@ captcha_result = asyncio.run(captchaSolver(image))
485
519
  ## Examples
486
520
  Examples of solving all supported captcha types are located in the [examples] directory.
487
521
 
488
- ### Useful links
522
+ ## Useful articles
523
+
524
+ - Amazon captcha solver: Code example for bypassing the [Amazon captcha](https://2captcha.com/blog/amazon-captcha-solving)
525
+ - [Captcha bypass in Selenium](https://2captcha.com/blog/captcha-bypass-in-selenium)
526
+
527
+ <!-- Shared links for README.md -->
489
528
  [2Captcha]: https://2captcha.com/
490
- [2captcha sofware catalog]: https://2captcha.com/software
529
+ [2captcha software catalog]: https://2captcha.com/software
491
530
  [pingback settings]: https://2captcha.com/setting/pingback
492
531
  [post options]: https://2captcha.com/2captcha-api#normal_post
493
532
  [list of supported languages]: https://2captcha.com/2captcha-api#language
@@ -1,20 +1,5 @@
1
- Metadata-Version: 2.1
2
- Name: 2captcha-python
3
- Version: 1.2.7
4
- Summary: Python module for easy integration with 2Captcha API
5
- Home-page: https://github.com/2captcha/2captcha-python/
6
- Author: 2Captcha
7
- Author-email: info@2captcha.com
8
- Classifier: Programming Language :: Python :: 3
9
- Classifier: License :: OSI Approved :: MIT License
10
- Classifier: Operating System :: OS Independent
11
- Requires-Python: >=3.6
12
- Description-Content-Type: text/markdown
13
- License-File: LICENSE
14
- Requires-Dist: requests
15
-
16
1
  # Python Module for 2Captcha API
17
- The easiest way to quickly integrate the 2Captcha captcha-solving service into your code and automate the solving of any type 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.
18
3
 
19
4
  - [Python Module for 2Captcha API](#python-module-for-2captcha-api)
20
5
  - [Installation](#installation)
@@ -29,8 +14,8 @@ The easiest way to quickly integrate the 2Captcha captcha-solving service into y
29
14
  - [reCAPTCHA v3](#recaptcha-v3)
30
15
  - [FunCaptcha](#funcaptcha)
31
16
  - [GeeTest](#geetest)
32
- - [hCaptcha](#hcaptcha)
33
17
  - [GeeTest v4](#geetest-v4)
18
+ - [hCaptcha](#hcaptcha)
34
19
  - [Lemin Cropped Captcha](#lemin-cropped-captcha)
35
20
  - [Cloudflare Turnstile](#cloudflare-turnstile)
36
21
  - [Amazon WAF](#amazon-waf)
@@ -49,10 +34,11 @@ The easiest way to quickly integrate the 2Captcha captcha-solving service into y
49
34
  - [send / get_result](#send--get_result)
50
35
  - [balance](#balance)
51
36
  - [report](#report)
52
- - [Error handling](#error-handling)
53
- - [Proxies](#proxies)
54
- - [Async calls](#async-calls)
37
+ - [Error handling](#error-handling)
38
+ - [Proxies](#proxies)
39
+ - [Async calls](#async-calls)
55
40
  - [Examples](#examples)
41
+ - [Useful articles](#useful-articles)
56
42
 
57
43
  ## Installation
58
44
 
@@ -89,16 +75,18 @@ solver = TwoCaptcha(**config)
89
75
 
90
76
  ### TwoCaptcha instance options
91
77
 
92
- | Option | Default value | Description |
93
- | ---------------- | -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
94
- | server | `2captcha.com` | API server. You can set it to `rucaptcha.com` if your account is registered there |
95
- | softId | - | your software ID obtained after publishing in [2captcha software catalog] |
96
- | callback | - | URL of your web server that receives the captcha recognition result. The URL should be first registered in [pingback settings] of your account |
78
+ | Option | Default value | Description |
79
+ | ---------------- | -------------- |--------------------------------------------------------------------------------------------------------------------------------------------------------|
80
+ | server | `2captcha.com` | API server. You can set it to `rucaptcha.com` if your account is registered there |
81
+ | softId | 4580 | your software ID obtained after publishing in [2captcha software catalog] |
82
+ | callback | - | URL of your web server that receives the captcha recognition result. The URL should be first registered in [pingback settings] of your account |
97
83
  | defaultTimeout | 120 | Polling timeout in seconds for all captcha types except reCAPTCHA. Defines how long the module tries to get the answer from the `res.php` API endpoint |
98
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 |
99
85
  | pollingInterval | 10 | Interval in seconds between requests to the `res.php` API endpoint. Setting values less than 5 seconds is not recommended |
100
86
 
101
- > **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
+
102
90
  To get the answer manually use [get_result method](#send--get_result)
103
91
 
104
92
  ## Solve captcha
@@ -234,7 +222,7 @@ result = solver.hcaptcha(sitekey='10000000-ffff-ffff-ffff-000000000001',
234
222
 
235
223
  <sup>[API method description.](https://2captcha.com/2captcha-api#lemin)</sup>
236
224
 
237
- Use this method to solve hCaptcha challenge. Returns JSON with an answer containing the following values: answer, challenge_id.
225
+ Use this method to solve the Lemin captcha. Returns JSON with an answer containing the following values: answer, challenge_id.
238
226
  ```python
239
227
  result = solver.lemin(captcha_id='CROPPED_1abcd2f_a1234b567c890d12ef3a456bc78d901d',
240
228
  div_id='lemin-cropped-captcha',
@@ -370,6 +358,10 @@ result = solver.mtcaptcha(sitekey='MTPublic-KzqLY1cKH',
370
358
  <sup>[API method description.](https://2captcha.com/2captcha-api#friendly-captcha)</sup>
371
359
 
372
360
  Friendly Captcha solving method. Returns a token.
361
+
362
+ > [!IMPORTANT]
363
+ > 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
+
373
365
  ```python
374
366
  result = solver.friendly_captcha(sitekey='FCMGEMUD2KTDSQ5H',
375
367
  url='https://friendlycaptcha.com/demo',
@@ -430,20 +422,27 @@ code = solver.get_result(id)
430
422
  ```
431
423
 
432
424
  ### balance
425
+
426
+ <sup>[API method description.](https://2captcha.com/2captcha-api#additional-methods)</sup>
427
+
433
428
  Use this method to get your account's balance
434
429
  ```python
435
430
  balance = solver.balance()
436
431
  ```
437
432
 
438
433
  ### report
434
+
435
+ <sup>[API method description.](https://2captcha.com/2captcha-api#complain)</sup>
436
+
439
437
  Use this method to report good or bad captcha answers.
440
438
  ```python
441
439
  solver.report(id, True) # captcha solved correctly
442
440
  solver.report(id, False) # captcha solved incorrectly
443
441
  ```
444
442
 
445
- ### Error handling
446
- 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).
447
446
  ```python
448
447
  try:
449
448
  result = solver.text('If tomorrow is Saturday, what day is today?')
@@ -462,7 +461,7 @@ except TimeoutException as e:
462
461
  ```
463
462
 
464
463
 
465
- ### Proxies
464
+ ## Proxies
466
465
 
467
466
  You can pass your proxy as an additional argument for the following methods: recaptcha, funcaptcha, geetest, geetest v4, hcaptcha,
468
467
  keycaptcha, capy puzzle, lemin, atbcaptcha, turnstile, amazon waf, mtcaptcha, friendly captcha, cutcaptcha.
@@ -478,7 +477,7 @@ proxy={
478
477
  }
479
478
  ```
480
479
 
481
- ### Async calls
480
+ ## Async calls
482
481
  You can also make async calls with [asyncio], for example:
483
482
 
484
483
  ```python
@@ -500,9 +499,14 @@ captcha_result = asyncio.run(captchaSolver(image))
500
499
  ## Examples
501
500
  Examples of solving all supported captcha types are located in the [examples] directory.
502
501
 
503
- ### Useful links
502
+ ## Useful articles
503
+
504
+ - Amazon captcha solver: Code example for bypassing the [Amazon captcha](https://2captcha.com/blog/amazon-captcha-solving)
505
+ - [Captcha bypass in Selenium](https://2captcha.com/blog/captcha-bypass-in-selenium)
506
+
507
+ <!-- Shared links for README.md -->
504
508
  [2Captcha]: https://2captcha.com/
505
- [2captcha sofware catalog]: https://2captcha.com/software
509
+ [2captcha software catalog]: https://2captcha.com/software
506
510
  [pingback settings]: https://2captcha.com/setting/pingback
507
511
  [post options]: https://2captcha.com/2captcha-api#normal_post
508
512
  [list of supported languages]: https://2captcha.com/2captcha-api#language
@@ -27,6 +27,15 @@ setup(name='2captcha-python',
27
27
  "Programming Language :: Python :: 3",
28
28
  "License :: OSI Approved :: MIT License",
29
29
  "Operating System :: OS Independent",
30
+ "Topic :: Software Development :: Libraries :: Python Modules",
31
+ "Topic :: Scientific/Engineering :: Image Recognition",
32
+ "Topic :: Utilities",
33
+ "Intended Audience :: Developers",
30
34
  ],
35
+ keywords=[
36
+ '2captcha', 'captcha', 'api', 'captcha solver', 'reCAPTCHA', 'hCaptcha',
37
+ 'FunCaptcha', 'Geetest', 'image captcha', 'Coordinates', 'Click Captcha',
38
+ 'Geetest V4', 'Lemin captcha', 'Amazon WAF', 'Cloudflare Turnstile',
39
+ 'Capy Puzzle', 'MTCaptcha', 'Friendly Captcha', 'Tencent'],
31
40
  python_requires='>=3.6',
32
41
  test_suite='tests')
@@ -12,4 +12,4 @@ support@2captcha.com
12
12
  """
13
13
 
14
14
  __author__ = '2captcha'
15
- __version__ = '1.2.7'
15
+ __version__ = '1.2.8'
File without changes