2captcha-python 1.5.0__tar.gz → 1.5.1__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 (37) hide show
  1. {2captcha_python-1.5.0 → 2captcha_python-1.5.1}/2captcha_python.egg-info/PKG-INFO +30 -34
  2. {2captcha_python-1.5.0 → 2captcha_python-1.5.1}/2captcha_python.egg-info/SOURCES.txt +1 -0
  3. {2captcha_python-1.5.0 → 2captcha_python-1.5.1}/PKG-INFO +30 -34
  4. {2captcha_python-1.5.0 → 2captcha_python-1.5.1}/README.md +18 -32
  5. {2captcha_python-1.5.0 → 2captcha_python-1.5.1}/setup.py +1 -1
  6. 2captcha_python-1.5.1/tests/test_yandex_smart_captcha.py +29 -0
  7. {2captcha_python-1.5.0 → 2captcha_python-1.5.1}/twocaptcha/__init__.py +2 -2
  8. {2captcha_python-1.5.0 → 2captcha_python-1.5.1}/twocaptcha/solver.py +27 -0
  9. {2captcha_python-1.5.0 → 2captcha_python-1.5.1}/2captcha_python.egg-info/dependency_links.txt +0 -0
  10. {2captcha_python-1.5.0 → 2captcha_python-1.5.1}/2captcha_python.egg-info/requires.txt +0 -0
  11. {2captcha_python-1.5.0 → 2captcha_python-1.5.1}/2captcha_python.egg-info/top_level.txt +0 -0
  12. {2captcha_python-1.5.0 → 2captcha_python-1.5.1}/LICENSE +0 -0
  13. {2captcha_python-1.5.0 → 2captcha_python-1.5.1}/setup.cfg +0 -0
  14. {2captcha_python-1.5.0 → 2captcha_python-1.5.1}/tests/test_amazon_waf.py +0 -0
  15. {2captcha_python-1.5.0 → 2captcha_python-1.5.1}/tests/test_atb_captcha.py +0 -0
  16. {2captcha_python-1.5.0 → 2captcha_python-1.5.1}/tests/test_canvas.py +0 -0
  17. {2captcha_python-1.5.0 → 2captcha_python-1.5.1}/tests/test_capy.py +0 -0
  18. {2captcha_python-1.5.0 → 2captcha_python-1.5.1}/tests/test_coordinates.py +0 -0
  19. {2captcha_python-1.5.0 → 2captcha_python-1.5.1}/tests/test_cutcaptcha.py +0 -0
  20. {2captcha_python-1.5.0 → 2captcha_python-1.5.1}/tests/test_cybersiara.py +0 -0
  21. {2captcha_python-1.5.0 → 2captcha_python-1.5.1}/tests/test_datadome.py +0 -0
  22. {2captcha_python-1.5.0 → 2captcha_python-1.5.1}/tests/test_friendly_captcha.py +0 -0
  23. {2captcha_python-1.5.0 → 2captcha_python-1.5.1}/tests/test_funcaptcha.py +0 -0
  24. {2captcha_python-1.5.0 → 2captcha_python-1.5.1}/tests/test_geetest.py +0 -0
  25. {2captcha_python-1.5.0 → 2captcha_python-1.5.1}/tests/test_geetest_v4.py +0 -0
  26. {2captcha_python-1.5.0 → 2captcha_python-1.5.1}/tests/test_grid.py +0 -0
  27. {2captcha_python-1.5.0 → 2captcha_python-1.5.1}/tests/test_hcaptcha.py +0 -0
  28. {2captcha_python-1.5.0 → 2captcha_python-1.5.1}/tests/test_keycaptcha.py +0 -0
  29. {2captcha_python-1.5.0 → 2captcha_python-1.5.1}/tests/test_lemin.py +0 -0
  30. {2captcha_python-1.5.0 → 2captcha_python-1.5.1}/tests/test_mtcaptcha.py +0 -0
  31. {2captcha_python-1.5.0 → 2captcha_python-1.5.1}/tests/test_normal.py +0 -0
  32. {2captcha_python-1.5.0 → 2captcha_python-1.5.1}/tests/test_recaptcha.py +0 -0
  33. {2captcha_python-1.5.0 → 2captcha_python-1.5.1}/tests/test_rotate.py +0 -0
  34. {2captcha_python-1.5.0 → 2captcha_python-1.5.1}/tests/test_tencent.py +0 -0
  35. {2captcha_python-1.5.0 → 2captcha_python-1.5.1}/tests/test_text.py +0 -0
  36. {2captcha_python-1.5.0 → 2captcha_python-1.5.1}/tests/test_turnstile.py +0 -0
  37. {2captcha_python-1.5.0 → 2captcha_python-1.5.1}/twocaptcha/api.py +0 -0
@@ -1,11 +1,11 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: 2captcha-python
3
- Version: 1.5.0
3
+ Version: 1.5.1
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,Cutcaptcha,DataDome,cybersiara
8
+ Keywords: 2captcha,captcha,api,captcha solver,reCAPTCHA,FunCaptcha,Geetest,image captcha,Coordinates,Click Captcha,Geetest V4,Lemin captcha,Amazon WAF,Cloudflare Turnstile,Capy Puzzle,MTCaptcha,Friendly Captcha,Tencent,Cutcaptcha,DataDome,cybersiara
9
9
  Classifier: Programming Language :: Python :: 3
10
10
  Classifier: License :: OSI Approved :: MIT License
11
11
  Classifier: Operating System :: OS Independent
@@ -17,6 +17,16 @@ Requires-Python: >=3.6
17
17
  Description-Content-Type: text/markdown
18
18
  License-File: LICENSE
19
19
  Requires-Dist: requests
20
+ Dynamic: author
21
+ Dynamic: author-email
22
+ Dynamic: classifier
23
+ Dynamic: description
24
+ Dynamic: description-content-type
25
+ Dynamic: home-page
26
+ Dynamic: keywords
27
+ Dynamic: requires-dist
28
+ Dynamic: requires-python
29
+ Dynamic: summary
20
30
 
21
31
  <a href="https://github.com/2captcha/2captcha-python"><img src="https://github.com/user-attachments/assets/a737d428-5233-4605-9d09-211fa213d069" width="82" height="30"></a>
22
32
  <a href="https://github.com/2captcha/2captcha-javascript"><img src="https://github.com/user-attachments/assets/4d3b4541-34b2-4ed2-a687-d694ce67e5a6" width="36" height="30"></a>
@@ -46,7 +56,7 @@ Examples of API requests for different captcha types are available on the [Pytho
46
56
  - [FunCaptcha](#funcaptcha)
47
57
  - [GeeTest](#geetest)
48
58
  - [GeeTest v4](#geetest-v4)
49
- - [hCaptcha](#hcaptcha)
59
+ - [Yandex Smart](#yandex-smart)
50
60
  - [Lemin Cropped Captcha](#lemin-cropped-captcha)
51
61
  - [Cloudflare Turnstile](#cloudflare-turnstile)
52
62
  - [Amazon WAF](#amazon-waf)
@@ -61,7 +71,7 @@ Examples of API requests for different captcha types are available on the [Pytho
61
71
  - [Friendly Captcha](#friendly-captcha)
62
72
  - [Cutcaptcha](#cutcaptcha)
63
73
  - [Tencent](#tencent)
64
- - [Datadome](#datadome)
74
+ - [DataDome](#datadome)
65
75
  - [CyberSiARA](#cybersiara)
66
76
  - [Other methods](#other-methods)
67
77
  - [send / get\_result](#send--get_result)
@@ -107,6 +117,7 @@ config = {
107
117
  'defaultTimeout': 120,
108
118
  'recaptchaTimeout': 600,
109
119
  'pollingInterval': 10,
120
+ 'extendedResponse': False
110
121
  }
111
122
  solver = TwoCaptcha(**config)
112
123
  ```
@@ -121,7 +132,7 @@ solver = TwoCaptcha(**config)
121
132
  | 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 |
122
133
  | recaptchaTimeout | 600 | Polling timeout for reCAPTCHA in seconds. Defines how long the module tries to get the answer from the `res.php` API endpoint |
123
134
  | pollingInterval | 10 | Interval in seconds between requests to the `res.php` API endpoint. Setting values less than 5 seconds is not recommended |
124
- | extendedResponse | None | Set to `True` to get the response with additional fields or in more practical format (enables `JSON` response from `res.php` API endpoint). Suitable for [hCaptcha](#hcaptcha), [ClickCaptcha](#clickcaptcha), [Canvas](#canvas) |
135
+ | extendedResponse | None | Set to `True` to get the response with additional fields or in more practical format (enables `JSON` response from `res.php` API endpoint). Suitable for [ClickCaptcha](#clickcaptcha), [Canvas](#canvas) |
125
136
 
126
137
 
127
138
  > [!IMPORTANT]
@@ -245,19 +256,6 @@ result = solver.geetest_v4(captcha_id='e392e1d7fd421dc63325744d5a2b9c73',
245
256
  ```
246
257
 
247
258
 
248
- ### hCaptcha
249
-
250
- <sup>[API method description.](https://2captcha.com/2captcha-api#solving_hcaptcha)</sup>
251
-
252
- Use this method to solve the hCaptcha challenge. Returns a token to bypass the captcha.
253
- ```python
254
- result = solver.hcaptcha(sitekey='10000000-ffff-ffff-ffff-000000000001',
255
- url='https://www.site.com/page/',
256
- param1=..., ...)
257
-
258
- ```
259
-
260
-
261
259
  ### Lemin Cropped Captcha
262
260
 
263
261
  <sup>[API method description.](https://2captcha.com/2captcha-api#lemin)</sup>
@@ -271,6 +269,15 @@ result = solver.lemin(captcha_id='CROPPED_1abcd2f_a1234b567c890d12ef3a456bc78d90
271
269
 
272
270
  ```
273
271
 
272
+ ### Yandex Smart
273
+
274
+ Use this method to solve Yandex Smart Captcha. Returns JSON with the token.
275
+ ```python
276
+ result = solver.yandex_smart(sitekey='0x1AAAAh45AAAAkg0s2VIOD34y5hy4h4h',
277
+ url='http://mysite.com/',
278
+ proxy={'type': 'HTTPS', 'uri': 'login:password@IP_address:PORT'},
279
+ userAgent='Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36')
280
+ ```
274
281
 
275
282
  ### Cloudflare Turnstile
276
283
 
@@ -424,7 +431,7 @@ result = solver.cutcaptcha(misery_key='ad52c87af17e2ec09b8d918c9f00416b1cb8c320'
424
431
 
425
432
  <sup>[API method description.](https://2captcha.com/2captcha-api#tencent)</sup>
426
433
 
427
- Use this method to solve Cutcaptcha. Returns a token.
434
+ Use this method to solve Tencent captcha. Returns a token.
428
435
  ```python
429
436
  result = solver.tencent(app_id="197326679",
430
437
  url="https://mysite.com/page/with/tencent",
@@ -467,7 +474,7 @@ result = solver.cybersiara(master_url_id='tpjOCKjjpdzv3d8Ub2E9COEWKt1vl1Mv',
467
474
 
468
475
  ### send / get_result
469
476
  These methods can be used for manual captcha submission and answer polling. The `send()` method supports sending any captcha
470
- type, to specify the captcha type you must send value `method` manually, for example `method='hcaptcha'` for solving hCapthca.
477
+ type, to specify the captcha type you must send value `method` manually, for example `method='recaptcha'` for solving reCaptcha.
471
478
  You can find the value of the `method` parameter in the [API documentation](https://2captcha.com/2captcha-api).
472
479
 
473
480
  Example for solving Normal captcha manually:
@@ -479,17 +486,6 @@ import time
479
486
  id = solver.send(file='path/to/captcha.jpg')
480
487
  time.sleep(20)
481
488
 
482
- code = solver.get_result(id)
483
- ```
484
- Example for solving hCaptcha manually:
485
- ```python
486
- import time
487
- . . . . .
488
- id = solver.send(sitekey='41b778e7-8f20-45cc-a804-1f1ebb45c579',
489
- url='https://2captcha.com/demo/hcaptcha?difficulty=easy',
490
- method='hcaptcha')
491
- print(id)
492
- time.sleep(20)
493
489
  code = solver.get_result(id)
494
490
  ```
495
491
 
@@ -535,7 +531,7 @@ except TimeoutException as e:
535
531
 
536
532
  ## Proxies
537
533
 
538
- You can pass your proxy as an additional argument for the following methods: recaptcha, funcaptcha, geetest, geetest v4, hcaptcha,
534
+ You can pass your proxy as an additional argument for the following methods: recaptcha, funcaptcha, geetest, geetest v4,
539
535
  keycaptcha, capy puzzle, lemin, atbcaptcha, turnstile, amazon waf, mtcaptcha, friendly captcha, cutcaptcha, Tencent, DataDome, cybersiara.
540
536
 
541
537
 
@@ -573,7 +569,7 @@ captcha_result = asyncio.run(captchaSolver(image))
573
569
  Examples of solving all supported captcha types are located in the [examples] directory.
574
570
 
575
571
  ## Examples using Selenium
576
- Also we have a [separate repository](https://github.com/2captcha/captcha-solver-selenium-python-examples) you can find examples of captcha solving using [Selenium](https://pypi.org/project/selenium/) library. At the moment we have implemented examples of bypassing [reCAPTCHA](https://github.com/2captcha/captcha-solver-selenium-python-examples/tree/main/examples/reCAPTCHA), [hCaptcha](https://github.com/2captcha/captcha-solver-selenium-python-examples/tree/main/examples/hCaptcha), [normal captcha](https://github.com/2captcha/captcha-solver-selenium-python-examples/tree/main/examples/normal_captcha) (image captcha) and [text captcha](https://github.com/2captcha/captcha-solver-selenium-python-examples/tree/main/examples/text_captcha) using Selenium.
572
+ Also we have a [separate repository](https://github.com/2captcha/captcha-solver-selenium-python-examples) you can find examples of captcha solving using [Selenium](https://pypi.org/project/selenium/) library. At the moment we have implemented examples of bypassing [reCAPTCHA](https://github.com/2captcha/captcha-solver-selenium-python-examples/tree/main/examples/reCAPTCHA), [Cloudflare](https://github.com/2captcha/captcha-solver-selenium-python-examples/tree/main/examples/cloudflare), [Coordinates](https://github.com/2captcha/captcha-solver-selenium-python-examples/tree/main/examples/coordinates), [MTCaptcha](https://github.com/2captcha/captcha-solver-selenium-python-examples/tree/main/examples/mtcaptcha), [normal captcha](https://github.com/2captcha/captcha-solver-selenium-python-examples/tree/main/examples/normal_captcha) (image captcha) and [text captcha](https://github.com/2captcha/captcha-solver-selenium-python-examples/tree/main/examples/text_captcha) using Selenium.
577
573
 
578
574
  ## Useful articles
579
575
 
@@ -29,6 +29,7 @@ tests/test_rotate.py
29
29
  tests/test_tencent.py
30
30
  tests/test_text.py
31
31
  tests/test_turnstile.py
32
+ tests/test_yandex_smart_captcha.py
32
33
  twocaptcha/__init__.py
33
34
  twocaptcha/api.py
34
35
  twocaptcha/solver.py
@@ -1,11 +1,11 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: 2captcha-python
3
- Version: 1.5.0
3
+ Version: 1.5.1
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,Cutcaptcha,DataDome,cybersiara
8
+ Keywords: 2captcha,captcha,api,captcha solver,reCAPTCHA,FunCaptcha,Geetest,image captcha,Coordinates,Click Captcha,Geetest V4,Lemin captcha,Amazon WAF,Cloudflare Turnstile,Capy Puzzle,MTCaptcha,Friendly Captcha,Tencent,Cutcaptcha,DataDome,cybersiara
9
9
  Classifier: Programming Language :: Python :: 3
10
10
  Classifier: License :: OSI Approved :: MIT License
11
11
  Classifier: Operating System :: OS Independent
@@ -17,6 +17,16 @@ Requires-Python: >=3.6
17
17
  Description-Content-Type: text/markdown
18
18
  License-File: LICENSE
19
19
  Requires-Dist: requests
20
+ Dynamic: author
21
+ Dynamic: author-email
22
+ Dynamic: classifier
23
+ Dynamic: description
24
+ Dynamic: description-content-type
25
+ Dynamic: home-page
26
+ Dynamic: keywords
27
+ Dynamic: requires-dist
28
+ Dynamic: requires-python
29
+ Dynamic: summary
20
30
 
21
31
  <a href="https://github.com/2captcha/2captcha-python"><img src="https://github.com/user-attachments/assets/a737d428-5233-4605-9d09-211fa213d069" width="82" height="30"></a>
22
32
  <a href="https://github.com/2captcha/2captcha-javascript"><img src="https://github.com/user-attachments/assets/4d3b4541-34b2-4ed2-a687-d694ce67e5a6" width="36" height="30"></a>
@@ -46,7 +56,7 @@ Examples of API requests for different captcha types are available on the [Pytho
46
56
  - [FunCaptcha](#funcaptcha)
47
57
  - [GeeTest](#geetest)
48
58
  - [GeeTest v4](#geetest-v4)
49
- - [hCaptcha](#hcaptcha)
59
+ - [Yandex Smart](#yandex-smart)
50
60
  - [Lemin Cropped Captcha](#lemin-cropped-captcha)
51
61
  - [Cloudflare Turnstile](#cloudflare-turnstile)
52
62
  - [Amazon WAF](#amazon-waf)
@@ -61,7 +71,7 @@ Examples of API requests for different captcha types are available on the [Pytho
61
71
  - [Friendly Captcha](#friendly-captcha)
62
72
  - [Cutcaptcha](#cutcaptcha)
63
73
  - [Tencent](#tencent)
64
- - [Datadome](#datadome)
74
+ - [DataDome](#datadome)
65
75
  - [CyberSiARA](#cybersiara)
66
76
  - [Other methods](#other-methods)
67
77
  - [send / get\_result](#send--get_result)
@@ -107,6 +117,7 @@ config = {
107
117
  'defaultTimeout': 120,
108
118
  'recaptchaTimeout': 600,
109
119
  'pollingInterval': 10,
120
+ 'extendedResponse': False
110
121
  }
111
122
  solver = TwoCaptcha(**config)
112
123
  ```
@@ -121,7 +132,7 @@ solver = TwoCaptcha(**config)
121
132
  | 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 |
122
133
  | recaptchaTimeout | 600 | Polling timeout for reCAPTCHA in seconds. Defines how long the module tries to get the answer from the `res.php` API endpoint |
123
134
  | pollingInterval | 10 | Interval in seconds between requests to the `res.php` API endpoint. Setting values less than 5 seconds is not recommended |
124
- | extendedResponse | None | Set to `True` to get the response with additional fields or in more practical format (enables `JSON` response from `res.php` API endpoint). Suitable for [hCaptcha](#hcaptcha), [ClickCaptcha](#clickcaptcha), [Canvas](#canvas) |
135
+ | extendedResponse | None | Set to `True` to get the response with additional fields or in more practical format (enables `JSON` response from `res.php` API endpoint). Suitable for [ClickCaptcha](#clickcaptcha), [Canvas](#canvas) |
125
136
 
126
137
 
127
138
  > [!IMPORTANT]
@@ -245,19 +256,6 @@ result = solver.geetest_v4(captcha_id='e392e1d7fd421dc63325744d5a2b9c73',
245
256
  ```
246
257
 
247
258
 
248
- ### hCaptcha
249
-
250
- <sup>[API method description.](https://2captcha.com/2captcha-api#solving_hcaptcha)</sup>
251
-
252
- Use this method to solve the hCaptcha challenge. Returns a token to bypass the captcha.
253
- ```python
254
- result = solver.hcaptcha(sitekey='10000000-ffff-ffff-ffff-000000000001',
255
- url='https://www.site.com/page/',
256
- param1=..., ...)
257
-
258
- ```
259
-
260
-
261
259
  ### Lemin Cropped Captcha
262
260
 
263
261
  <sup>[API method description.](https://2captcha.com/2captcha-api#lemin)</sup>
@@ -271,6 +269,15 @@ result = solver.lemin(captcha_id='CROPPED_1abcd2f_a1234b567c890d12ef3a456bc78d90
271
269
 
272
270
  ```
273
271
 
272
+ ### Yandex Smart
273
+
274
+ Use this method to solve Yandex Smart Captcha. Returns JSON with the token.
275
+ ```python
276
+ result = solver.yandex_smart(sitekey='0x1AAAAh45AAAAkg0s2VIOD34y5hy4h4h',
277
+ url='http://mysite.com/',
278
+ proxy={'type': 'HTTPS', 'uri': 'login:password@IP_address:PORT'},
279
+ userAgent='Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36')
280
+ ```
274
281
 
275
282
  ### Cloudflare Turnstile
276
283
 
@@ -424,7 +431,7 @@ result = solver.cutcaptcha(misery_key='ad52c87af17e2ec09b8d918c9f00416b1cb8c320'
424
431
 
425
432
  <sup>[API method description.](https://2captcha.com/2captcha-api#tencent)</sup>
426
433
 
427
- Use this method to solve Cutcaptcha. Returns a token.
434
+ Use this method to solve Tencent captcha. Returns a token.
428
435
  ```python
429
436
  result = solver.tencent(app_id="197326679",
430
437
  url="https://mysite.com/page/with/tencent",
@@ -467,7 +474,7 @@ result = solver.cybersiara(master_url_id='tpjOCKjjpdzv3d8Ub2E9COEWKt1vl1Mv',
467
474
 
468
475
  ### send / get_result
469
476
  These methods can be used for manual captcha submission and answer polling. The `send()` method supports sending any captcha
470
- type, to specify the captcha type you must send value `method` manually, for example `method='hcaptcha'` for solving hCapthca.
477
+ type, to specify the captcha type you must send value `method` manually, for example `method='recaptcha'` for solving reCaptcha.
471
478
  You can find the value of the `method` parameter in the [API documentation](https://2captcha.com/2captcha-api).
472
479
 
473
480
  Example for solving Normal captcha manually:
@@ -479,17 +486,6 @@ import time
479
486
  id = solver.send(file='path/to/captcha.jpg')
480
487
  time.sleep(20)
481
488
 
482
- code = solver.get_result(id)
483
- ```
484
- Example for solving hCaptcha manually:
485
- ```python
486
- import time
487
- . . . . .
488
- id = solver.send(sitekey='41b778e7-8f20-45cc-a804-1f1ebb45c579',
489
- url='https://2captcha.com/demo/hcaptcha?difficulty=easy',
490
- method='hcaptcha')
491
- print(id)
492
- time.sleep(20)
493
489
  code = solver.get_result(id)
494
490
  ```
495
491
 
@@ -535,7 +531,7 @@ except TimeoutException as e:
535
531
 
536
532
  ## Proxies
537
533
 
538
- You can pass your proxy as an additional argument for the following methods: recaptcha, funcaptcha, geetest, geetest v4, hcaptcha,
534
+ You can pass your proxy as an additional argument for the following methods: recaptcha, funcaptcha, geetest, geetest v4,
539
535
  keycaptcha, capy puzzle, lemin, atbcaptcha, turnstile, amazon waf, mtcaptcha, friendly captcha, cutcaptcha, Tencent, DataDome, cybersiara.
540
536
 
541
537
 
@@ -573,7 +569,7 @@ captcha_result = asyncio.run(captchaSolver(image))
573
569
  Examples of solving all supported captcha types are located in the [examples] directory.
574
570
 
575
571
  ## Examples using Selenium
576
- Also we have a [separate repository](https://github.com/2captcha/captcha-solver-selenium-python-examples) you can find examples of captcha solving using [Selenium](https://pypi.org/project/selenium/) library. At the moment we have implemented examples of bypassing [reCAPTCHA](https://github.com/2captcha/captcha-solver-selenium-python-examples/tree/main/examples/reCAPTCHA), [hCaptcha](https://github.com/2captcha/captcha-solver-selenium-python-examples/tree/main/examples/hCaptcha), [normal captcha](https://github.com/2captcha/captcha-solver-selenium-python-examples/tree/main/examples/normal_captcha) (image captcha) and [text captcha](https://github.com/2captcha/captcha-solver-selenium-python-examples/tree/main/examples/text_captcha) using Selenium.
572
+ Also we have a [separate repository](https://github.com/2captcha/captcha-solver-selenium-python-examples) you can find examples of captcha solving using [Selenium](https://pypi.org/project/selenium/) library. At the moment we have implemented examples of bypassing [reCAPTCHA](https://github.com/2captcha/captcha-solver-selenium-python-examples/tree/main/examples/reCAPTCHA), [Cloudflare](https://github.com/2captcha/captcha-solver-selenium-python-examples/tree/main/examples/cloudflare), [Coordinates](https://github.com/2captcha/captcha-solver-selenium-python-examples/tree/main/examples/coordinates), [MTCaptcha](https://github.com/2captcha/captcha-solver-selenium-python-examples/tree/main/examples/mtcaptcha), [normal captcha](https://github.com/2captcha/captcha-solver-selenium-python-examples/tree/main/examples/normal_captcha) (image captcha) and [text captcha](https://github.com/2captcha/captcha-solver-selenium-python-examples/tree/main/examples/text_captcha) using Selenium.
577
573
 
578
574
  ## Useful articles
579
575
 
@@ -26,7 +26,7 @@ Examples of API requests for different captcha types are available on the [Pytho
26
26
  - [FunCaptcha](#funcaptcha)
27
27
  - [GeeTest](#geetest)
28
28
  - [GeeTest v4](#geetest-v4)
29
- - [hCaptcha](#hcaptcha)
29
+ - [Yandex Smart](#yandex-smart)
30
30
  - [Lemin Cropped Captcha](#lemin-cropped-captcha)
31
31
  - [Cloudflare Turnstile](#cloudflare-turnstile)
32
32
  - [Amazon WAF](#amazon-waf)
@@ -41,7 +41,7 @@ Examples of API requests for different captcha types are available on the [Pytho
41
41
  - [Friendly Captcha](#friendly-captcha)
42
42
  - [Cutcaptcha](#cutcaptcha)
43
43
  - [Tencent](#tencent)
44
- - [Datadome](#datadome)
44
+ - [DataDome](#datadome)
45
45
  - [CyberSiARA](#cybersiara)
46
46
  - [Other methods](#other-methods)
47
47
  - [send / get\_result](#send--get_result)
@@ -87,6 +87,7 @@ config = {
87
87
  'defaultTimeout': 120,
88
88
  'recaptchaTimeout': 600,
89
89
  'pollingInterval': 10,
90
+ 'extendedResponse': False
90
91
  }
91
92
  solver = TwoCaptcha(**config)
92
93
  ```
@@ -101,7 +102,7 @@ solver = TwoCaptcha(**config)
101
102
  | 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 |
102
103
  | recaptchaTimeout | 600 | Polling timeout for reCAPTCHA in seconds. Defines how long the module tries to get the answer from the `res.php` API endpoint |
103
104
  | pollingInterval | 10 | Interval in seconds between requests to the `res.php` API endpoint. Setting values less than 5 seconds is not recommended |
104
- | extendedResponse | None | Set to `True` to get the response with additional fields or in more practical format (enables `JSON` response from `res.php` API endpoint). Suitable for [hCaptcha](#hcaptcha), [ClickCaptcha](#clickcaptcha), [Canvas](#canvas) |
105
+ | extendedResponse | None | Set to `True` to get the response with additional fields or in more practical format (enables `JSON` response from `res.php` API endpoint). Suitable for [ClickCaptcha](#clickcaptcha), [Canvas](#canvas) |
105
106
 
106
107
 
107
108
  > [!IMPORTANT]
@@ -225,19 +226,6 @@ result = solver.geetest_v4(captcha_id='e392e1d7fd421dc63325744d5a2b9c73',
225
226
  ```
226
227
 
227
228
 
228
- ### hCaptcha
229
-
230
- <sup>[API method description.](https://2captcha.com/2captcha-api#solving_hcaptcha)</sup>
231
-
232
- Use this method to solve the hCaptcha challenge. Returns a token to bypass the captcha.
233
- ```python
234
- result = solver.hcaptcha(sitekey='10000000-ffff-ffff-ffff-000000000001',
235
- url='https://www.site.com/page/',
236
- param1=..., ...)
237
-
238
- ```
239
-
240
-
241
229
  ### Lemin Cropped Captcha
242
230
 
243
231
  <sup>[API method description.](https://2captcha.com/2captcha-api#lemin)</sup>
@@ -251,6 +239,15 @@ result = solver.lemin(captcha_id='CROPPED_1abcd2f_a1234b567c890d12ef3a456bc78d90
251
239
 
252
240
  ```
253
241
 
242
+ ### Yandex Smart
243
+
244
+ Use this method to solve Yandex Smart Captcha. Returns JSON with the token.
245
+ ```python
246
+ result = solver.yandex_smart(sitekey='0x1AAAAh45AAAAkg0s2VIOD34y5hy4h4h',
247
+ url='http://mysite.com/',
248
+ proxy={'type': 'HTTPS', 'uri': 'login:password@IP_address:PORT'},
249
+ userAgent='Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36')
250
+ ```
254
251
 
255
252
  ### Cloudflare Turnstile
256
253
 
@@ -404,7 +401,7 @@ result = solver.cutcaptcha(misery_key='ad52c87af17e2ec09b8d918c9f00416b1cb8c320'
404
401
 
405
402
  <sup>[API method description.](https://2captcha.com/2captcha-api#tencent)</sup>
406
403
 
407
- Use this method to solve Cutcaptcha. Returns a token.
404
+ Use this method to solve Tencent captcha. Returns a token.
408
405
  ```python
409
406
  result = solver.tencent(app_id="197326679",
410
407
  url="https://mysite.com/page/with/tencent",
@@ -447,7 +444,7 @@ result = solver.cybersiara(master_url_id='tpjOCKjjpdzv3d8Ub2E9COEWKt1vl1Mv',
447
444
 
448
445
  ### send / get_result
449
446
  These methods can be used for manual captcha submission and answer polling. The `send()` method supports sending any captcha
450
- type, to specify the captcha type you must send value `method` manually, for example `method='hcaptcha'` for solving hCapthca.
447
+ type, to specify the captcha type you must send value `method` manually, for example `method='recaptcha'` for solving reCaptcha.
451
448
  You can find the value of the `method` parameter in the [API documentation](https://2captcha.com/2captcha-api).
452
449
 
453
450
  Example for solving Normal captcha manually:
@@ -459,17 +456,6 @@ import time
459
456
  id = solver.send(file='path/to/captcha.jpg')
460
457
  time.sleep(20)
461
458
 
462
- code = solver.get_result(id)
463
- ```
464
- Example for solving hCaptcha manually:
465
- ```python
466
- import time
467
- . . . . .
468
- id = solver.send(sitekey='41b778e7-8f20-45cc-a804-1f1ebb45c579',
469
- url='https://2captcha.com/demo/hcaptcha?difficulty=easy',
470
- method='hcaptcha')
471
- print(id)
472
- time.sleep(20)
473
459
  code = solver.get_result(id)
474
460
  ```
475
461
 
@@ -515,7 +501,7 @@ except TimeoutException as e:
515
501
 
516
502
  ## Proxies
517
503
 
518
- You can pass your proxy as an additional argument for the following methods: recaptcha, funcaptcha, geetest, geetest v4, hcaptcha,
504
+ You can pass your proxy as an additional argument for the following methods: recaptcha, funcaptcha, geetest, geetest v4,
519
505
  keycaptcha, capy puzzle, lemin, atbcaptcha, turnstile, amazon waf, mtcaptcha, friendly captcha, cutcaptcha, Tencent, DataDome, cybersiara.
520
506
 
521
507
 
@@ -553,7 +539,7 @@ captcha_result = asyncio.run(captchaSolver(image))
553
539
  Examples of solving all supported captcha types are located in the [examples] directory.
554
540
 
555
541
  ## Examples using Selenium
556
- Also we have a [separate repository](https://github.com/2captcha/captcha-solver-selenium-python-examples) you can find examples of captcha solving using [Selenium](https://pypi.org/project/selenium/) library. At the moment we have implemented examples of bypassing [reCAPTCHA](https://github.com/2captcha/captcha-solver-selenium-python-examples/tree/main/examples/reCAPTCHA), [hCaptcha](https://github.com/2captcha/captcha-solver-selenium-python-examples/tree/main/examples/hCaptcha), [normal captcha](https://github.com/2captcha/captcha-solver-selenium-python-examples/tree/main/examples/normal_captcha) (image captcha) and [text captcha](https://github.com/2captcha/captcha-solver-selenium-python-examples/tree/main/examples/text_captcha) using Selenium.
542
+ Also we have a [separate repository](https://github.com/2captcha/captcha-solver-selenium-python-examples) you can find examples of captcha solving using [Selenium](https://pypi.org/project/selenium/) library. At the moment we have implemented examples of bypassing [reCAPTCHA](https://github.com/2captcha/captcha-solver-selenium-python-examples/tree/main/examples/reCAPTCHA), [Cloudflare](https://github.com/2captcha/captcha-solver-selenium-python-examples/tree/main/examples/cloudflare), [Coordinates](https://github.com/2captcha/captcha-solver-selenium-python-examples/tree/main/examples/coordinates), [MTCaptcha](https://github.com/2captcha/captcha-solver-selenium-python-examples/tree/main/examples/mtcaptcha), [normal captcha](https://github.com/2captcha/captcha-solver-selenium-python-examples/tree/main/examples/normal_captcha) (image captcha) and [text captcha](https://github.com/2captcha/captcha-solver-selenium-python-examples/tree/main/examples/text_captcha) using Selenium.
557
543
 
558
544
  ## Useful articles
559
545
 
@@ -592,4 +578,4 @@ The graphics and trademarks included in this repository are not covered by the M
592
578
  [Buy residential proxies]: https://2captcha.com/proxy/residential-proxies
593
579
  [Quick start]: https://2captcha.com/proxy?openAddTrafficModal=true
594
580
  [examples]: ./examples
595
- [residential proxies]: https://2captcha.com/proxy/residential-proxies
581
+ [residential proxies]: https://2captcha.com/proxy/residential-proxies
@@ -33,7 +33,7 @@ setup(name='2captcha-python',
33
33
  "Intended Audience :: Developers",
34
34
  ],
35
35
  keywords=[
36
- '2captcha', 'captcha', 'api', 'captcha solver', 'reCAPTCHA', 'hCaptcha',
36
+ '2captcha', 'captcha', 'api', 'captcha solver', 'reCAPTCHA',
37
37
  'FunCaptcha', 'Geetest', 'image captcha', 'Coordinates', 'Click Captcha',
38
38
  'Geetest V4', 'Lemin captcha', 'Amazon WAF', 'Cloudflare Turnstile',
39
39
  'Capy Puzzle', 'MTCaptcha', 'Friendly Captcha', 'Tencent', 'Cutcaptcha', 'DataDome', 'cybersiara'],
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env python3
2
+
3
+ import unittest
4
+
5
+ try:
6
+ from .abstract import AbstractTest
7
+ except ImportError:
8
+ from abstract import AbstractTest
9
+
10
+
11
+ class YandexSmartCaptchaTest(AbstractTest):
12
+
13
+ def test_all_params(self):
14
+ params = {
15
+ 'sitekey': 'FEXfAbHQsToo97VidNVk3j4dC74nGW1DgdPpL4O',
16
+ 'url': 'https://www.site.com/page/',
17
+ }
18
+
19
+ sends = {
20
+ 'method': 'yandex',
21
+ 'sitekey': 'FEXfAbHQsToo97VidNVk3j4dC74nGW1DgdPpL4O',
22
+ 'pageurl': 'https://www.site.com/page/',
23
+ }
24
+
25
+ return self.send_return(sends, self.solver.yandex_smart, **params)
26
+
27
+
28
+ if __name__ == '__main__':
29
+ unittest.main()
@@ -3,7 +3,7 @@ from .solver import (TwoCaptcha, SolverExceptions, ValidationException,
3
3
  NetworkException, ApiException, TimeoutException)
4
4
 
5
5
  """
6
- Python 3 package for easy integration with the API of 2captcha captcha solving service to bypass recaptcha, hcaptcha,
6
+ Python 3 package for easy integration with the API of 2captcha captcha solving service to bypass recaptcha,
7
7
  funcaptcha, geetest and solve any other captchas.
8
8
 
9
9
  website 2captcha [https://2captcha.com/]
@@ -12,4 +12,4 @@ support@2captcha.com
12
12
  """
13
13
 
14
14
  __author__ = '2captcha'
15
- __version__ = '1.5.0'
15
+ __version__ = '1.5.1'
@@ -856,6 +856,33 @@ class TwoCaptcha():
856
856
  **kwargs)
857
857
  return result
858
858
 
859
+ def yandex_smart(self, sitekey, url, **kwargs):
860
+ '''Wrapper for solving Yandex Smart.
861
+
862
+ Parameters
863
+ __________
864
+ sitekey : str
865
+ The value of data-sitekey attribute of captcha's div element on page.
866
+ url : str
867
+ Full URL of the page where you solve the captcha.
868
+ softId : int, optional
869
+ ID of software developer. Developers who integrated their software with 2Captcha get reward: 10% of
870
+ spendings of their software users.
871
+ callback : str, optional
872
+ URL for pingback (callback) response that will be sent when captcha is solved. URL should be registered on
873
+ the server. More info here https://2captcha.com/2captcha-api#pingback.
874
+ proxy : dict, optional
875
+ {'type': 'HTTPS', 'uri': 'login:password@IP_address:PORT'}.
876
+ userAgent: str, optional
877
+ User-Agent of the browser that will be used by the employee when loading the captcha.
878
+ '''
879
+
880
+ result = self.solve(sitekey=sitekey,
881
+ url=url,
882
+ method='yandex',
883
+ **kwargs)
884
+ return result
885
+
859
886
  def solve(self, timeout=0, polling_interval=0, **kwargs):
860
887
  '''Sends captcha, receives result.
861
888
 
File without changes