2captcha-python 1.2.8__tar.gz → 1.4.0__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 (36) hide show
  1. {2captcha_python-1.2.8 → 2captcha_python-1.4.0}/2captcha_python.egg-info/PKG-INFO +81 -5
  2. {2captcha_python-1.2.8 → 2captcha_python-1.4.0}/2captcha_python.egg-info/SOURCES.txt +2 -0
  3. {2captcha_python-1.2.8 → 2captcha_python-1.4.0}/PKG-INFO +81 -5
  4. {2captcha_python-1.2.8 → 2captcha_python-1.4.0}/README.md +79 -3
  5. {2captcha_python-1.2.8 → 2captcha_python-1.4.0}/setup.py +1 -1
  6. 2captcha_python-1.4.0/tests/test_cybersiara.py +32 -0
  7. 2captcha_python-1.4.0/tests/test_datadome.py +34 -0
  8. {2captcha_python-1.2.8 → 2captcha_python-1.4.0}/twocaptcha/__init__.py +1 -1
  9. {2captcha_python-1.2.8 → 2captcha_python-1.4.0}/twocaptcha/solver.py +44 -0
  10. {2captcha_python-1.2.8 → 2captcha_python-1.4.0}/2captcha_python.egg-info/dependency_links.txt +0 -0
  11. {2captcha_python-1.2.8 → 2captcha_python-1.4.0}/2captcha_python.egg-info/requires.txt +0 -0
  12. {2captcha_python-1.2.8 → 2captcha_python-1.4.0}/2captcha_python.egg-info/top_level.txt +0 -0
  13. {2captcha_python-1.2.8 → 2captcha_python-1.4.0}/LICENSE +0 -0
  14. {2captcha_python-1.2.8 → 2captcha_python-1.4.0}/setup.cfg +0 -0
  15. {2captcha_python-1.2.8 → 2captcha_python-1.4.0}/tests/test_amazon_waf.py +0 -0
  16. {2captcha_python-1.2.8 → 2captcha_python-1.4.0}/tests/test_atb_captcha.py +0 -0
  17. {2captcha_python-1.2.8 → 2captcha_python-1.4.0}/tests/test_canvas.py +0 -0
  18. {2captcha_python-1.2.8 → 2captcha_python-1.4.0}/tests/test_capy.py +0 -0
  19. {2captcha_python-1.2.8 → 2captcha_python-1.4.0}/tests/test_coordinates.py +0 -0
  20. {2captcha_python-1.2.8 → 2captcha_python-1.4.0}/tests/test_cutcaptcha.py +0 -0
  21. {2captcha_python-1.2.8 → 2captcha_python-1.4.0}/tests/test_friendly_captcha.py +0 -0
  22. {2captcha_python-1.2.8 → 2captcha_python-1.4.0}/tests/test_funcaptcha.py +0 -0
  23. {2captcha_python-1.2.8 → 2captcha_python-1.4.0}/tests/test_geetest.py +0 -0
  24. {2captcha_python-1.2.8 → 2captcha_python-1.4.0}/tests/test_geetest_v4.py +0 -0
  25. {2captcha_python-1.2.8 → 2captcha_python-1.4.0}/tests/test_grid.py +0 -0
  26. {2captcha_python-1.2.8 → 2captcha_python-1.4.0}/tests/test_hcaptcha.py +0 -0
  27. {2captcha_python-1.2.8 → 2captcha_python-1.4.0}/tests/test_keycaptcha.py +0 -0
  28. {2captcha_python-1.2.8 → 2captcha_python-1.4.0}/tests/test_lemin.py +0 -0
  29. {2captcha_python-1.2.8 → 2captcha_python-1.4.0}/tests/test_mtcaptcha.py +0 -0
  30. {2captcha_python-1.2.8 → 2captcha_python-1.4.0}/tests/test_normal.py +0 -0
  31. {2captcha_python-1.2.8 → 2captcha_python-1.4.0}/tests/test_recaptcha.py +0 -0
  32. {2captcha_python-1.2.8 → 2captcha_python-1.4.0}/tests/test_rotate.py +0 -0
  33. {2captcha_python-1.2.8 → 2captcha_python-1.4.0}/tests/test_tencent.py +0 -0
  34. {2captcha_python-1.2.8 → 2captcha_python-1.4.0}/tests/test_text.py +0 -0
  35. {2captcha_python-1.2.8 → 2captcha_python-1.4.0}/tests/test_turnstile.py +0 -0
  36. {2captcha_python-1.2.8 → 2captcha_python-1.4.0}/twocaptcha/api.py +0 -0
@@ -1,11 +1,11 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: 2captcha-python
3
- Version: 1.2.8
3
+ Version: 1.4.0
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
+ 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
9
9
  Classifier: Programming Language :: Python :: 3
10
10
  Classifier: License :: OSI Approved :: MIT License
11
11
  Classifier: Operating System :: OS Independent
@@ -18,10 +18,21 @@ Description-Content-Type: text/markdown
18
18
  License-File: LICENSE
19
19
  Requires-Dist: requests
20
20
 
21
- # Python Module for 2Captcha API
21
+ <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
+ <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>
23
+ <a href="https://github.com/2captcha/2captcha-go"><img src="https://github.com/user-attachments/assets/ab22182e-6cb2-41fa-91f4-d5e89c6d7c6f" width="63" height="30"></a>
24
+ <a href="https://github.com/2captcha/2captcha-ruby"><img src="https://github.com/user-attachments/assets/0270d56f-79b0-4c95-9b09-4de89579914b" width="75" height="30"></a>
25
+ <a href="https://github.com/2captcha/2captcha-cpp"><img src="https://github.com/user-attachments/assets/36de8512-acfd-44fb-bb1f-b7c793a3f926" width="45" height="30"></a>
26
+ <a href="https://github.com/2captcha/2captcha-php"><img src="https://github.com/user-attachments/assets/e8797843-3f61-4fa9-a155-ab0b21fb3858" width="52" height="30"></a>
27
+ <a href="https://github.com/2captcha/2captcha-java"><img src="https://github.com/user-attachments/assets/a3d923f6-4fec-4c07-ac50-e20da6370911" width="50" height="30"></a>
28
+ <a href="https://github.com/2captcha/2captcha-csharp"><img src="https://github.com/user-attachments/assets/f4d449de-780b-49ed-bb0a-b70c82ec4b32" width="38" height="30"></a>
29
+
30
+ # Python Module for 2Captcha API (captcha solver)
31
+
22
32
  The easiest way to quickly integrate the [2Captcha] captcha-solving service into your code and automate the solving of any type of captcha.
33
+ Examples of API requests for different captcha types are available on the [Python captcha solver](https://2captcha.com/lang/python) page.
23
34
 
24
- - [Python Module for 2Captcha API](#python-module-for-2captcha-api)
35
+ - [Python Module for 2Captcha API (captcha solver)](#python-module-for-2captcha-api-captcha-solver)
25
36
  - [Installation](#installation)
26
37
  - [Configuration](#configuration)
27
38
  - [TwoCaptcha instance options](#twocaptcha-instance-options)
@@ -50,6 +61,8 @@ The easiest way to quickly integrate the [2Captcha] captcha-solving service into
50
61
  - [Friendly Captcha](#friendly-captcha)
51
62
  - [Cutcaptcha](#cutcaptcha)
52
63
  - [Tencent](#tencent)
64
+ - [Datadome](#datadome)
65
+ - [CyberSiARA](#cybersiara)
53
66
  - [Other methods](#other-methods)
54
67
  - [send / get_result](#send--get_result)
55
68
  - [balance](#balance)
@@ -58,7 +71,12 @@ The easiest way to quickly integrate the [2Captcha] captcha-solving service into
58
71
  - [Proxies](#proxies)
59
72
  - [Async calls](#async-calls)
60
73
  - [Examples](#examples)
74
+ - [Examples using Selenium](#examples-using-selenium)
61
75
  - [Useful articles](#useful-articles)
76
+ - [Get in touch](#get-in-touch)
77
+ - [Join the team 👪](#join-the-team-)
78
+ - [License](#license)
79
+ - [Graphics and Trademarks](#graphics-and-trademarks)
62
80
 
63
81
  ## Installation
64
82
 
@@ -411,6 +429,38 @@ result = solver.tencent(app_id="197326679",
411
429
  param1=..., ...)
412
430
  ```
413
431
 
432
+ ### DataDome
433
+
434
+ <sup>[API method description.](https://2captcha.com/2captcha-api#datadome)</sup>
435
+
436
+ Use this method to solve DataDome captcha.
437
+
438
+ > [!IMPORTANT]
439
+ > To solve the DataDome captcha, you must use a proxy. It is recommended to use [residential proxies].
440
+
441
+ ```python
442
+ result = solver.datadome(captcha_url="https://geo.captcha-delivery.com/captcha/?initialCid=...",
443
+ pageurl="https://mysite.com/page/with/datadome",
444
+ userAgent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36",
445
+ proxy={
446
+ 'type': 'HTTP',
447
+ 'uri': 'login:password@IP_address:PORT'
448
+ },
449
+ param1=..., ...)
450
+ ```
451
+
452
+ ### CyberSiARA
453
+
454
+ <sup>[API method description.](https://2captcha.com/2captcha-api#cybersiara)</sup>
455
+
456
+ Use this method to solve CyberSiARA. Returns a token.
457
+ ```python
458
+ result = solver.cybersiara(master_url_id='tpjOCKjjpdzv3d8Ub2E9COEWKt1vl1Mv',
459
+ pageurl='https://demo.mycybersiara.com/',
460
+ userAgent='Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36',
461
+ param1=..., ...)
462
+ ```
463
+
414
464
  ## Other methods
415
465
 
416
466
  ### send / get_result
@@ -484,7 +534,8 @@ except TimeoutException as e:
484
534
  ## Proxies
485
535
 
486
536
  You can pass your proxy as an additional argument for the following methods: recaptcha, funcaptcha, geetest, geetest v4, hcaptcha,
487
- keycaptcha, capy puzzle, lemin, atbcaptcha, turnstile, amazon waf, mtcaptcha, friendly captcha, cutcaptcha.
537
+ keycaptcha, capy puzzle, lemin, atbcaptcha, turnstile, amazon waf, mtcaptcha, friendly captcha, cutcaptcha, Tencent, DataDome, cybersiara.
538
+
488
539
 
489
540
  The proxy will be forwarded to the API to solve the captcha.
490
541
 
@@ -519,11 +570,35 @@ captcha_result = asyncio.run(captchaSolver(image))
519
570
  ## Examples
520
571
  Examples of solving all supported captcha types are located in the [examples] directory.
521
572
 
573
+ ## Examples using Selenium
574
+ 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.
575
+
522
576
  ## Useful articles
523
577
 
524
578
  - Amazon captcha solver: Code example for bypassing the [Amazon captcha](https://2captcha.com/blog/amazon-captcha-solving)
525
579
  - [Captcha bypass in Selenium](https://2captcha.com/blog/captcha-bypass-in-selenium)
526
580
 
581
+ ## Get in touch
582
+
583
+ <a href="mailto:support@2captcha.com"><img src="https://github.com/user-attachments/assets/539df209-7c85-4fa5-84b4-fc22ab93fac7" width="80" height="30"></a>
584
+ <a href="https://2captcha.com/support/tickets/new"><img src="https://github.com/user-attachments/assets/be044db5-2e67-46c6-8c81-04b78bd99650" width="81" height="30"></a>
585
+
586
+ ## Join the team 👪
587
+
588
+ There are many ways to contribute, of which development is only one! Find your next job. Open positions: AI experts, scrapers, developers, technical support, and much more! 😍
589
+
590
+ <a href="mailto:job@2captcha.com"><img src="https://github.com/user-attachments/assets/36d23ef5-7866-4841-8e17-261cc8a4e033" width="80" height="30"></a>
591
+
592
+
593
+ ## License
594
+
595
+ The code in this repository is licensed under the MIT License. See the [LICENSE](./LICENSE) file for more details.
596
+
597
+ ### Graphics and Trademarks
598
+
599
+ The graphics and trademarks included in this repository are not covered by the MIT License. Please contact <a href="mailto:support@2captcha.com">support</a> for permissions regarding the use of these materials.
600
+
601
+
527
602
  <!-- Shared links for README.md -->
528
603
  [2Captcha]: https://2captcha.com/
529
604
  [2captcha software catalog]: https://2captcha.com/software
@@ -535,3 +610,4 @@ Examples of solving all supported captcha types are located in the [examples] di
535
610
  [Buy residential proxies]: https://2captcha.com/proxy/residential-proxies
536
611
  [Quick start]: https://2captcha.com/proxy?openAddTrafficModal=true
537
612
  [examples]: ./examples
613
+ [residential proxies]: https://2captcha.com/proxy/residential-proxies
@@ -12,6 +12,8 @@ tests/test_canvas.py
12
12
  tests/test_capy.py
13
13
  tests/test_coordinates.py
14
14
  tests/test_cutcaptcha.py
15
+ tests/test_cybersiara.py
16
+ tests/test_datadome.py
15
17
  tests/test_friendly_captcha.py
16
18
  tests/test_funcaptcha.py
17
19
  tests/test_geetest.py
@@ -1,11 +1,11 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: 2captcha-python
3
- Version: 1.2.8
3
+ Version: 1.4.0
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
+ 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
9
9
  Classifier: Programming Language :: Python :: 3
10
10
  Classifier: License :: OSI Approved :: MIT License
11
11
  Classifier: Operating System :: OS Independent
@@ -18,10 +18,21 @@ Description-Content-Type: text/markdown
18
18
  License-File: LICENSE
19
19
  Requires-Dist: requests
20
20
 
21
- # Python Module for 2Captcha API
21
+ <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
+ <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>
23
+ <a href="https://github.com/2captcha/2captcha-go"><img src="https://github.com/user-attachments/assets/ab22182e-6cb2-41fa-91f4-d5e89c6d7c6f" width="63" height="30"></a>
24
+ <a href="https://github.com/2captcha/2captcha-ruby"><img src="https://github.com/user-attachments/assets/0270d56f-79b0-4c95-9b09-4de89579914b" width="75" height="30"></a>
25
+ <a href="https://github.com/2captcha/2captcha-cpp"><img src="https://github.com/user-attachments/assets/36de8512-acfd-44fb-bb1f-b7c793a3f926" width="45" height="30"></a>
26
+ <a href="https://github.com/2captcha/2captcha-php"><img src="https://github.com/user-attachments/assets/e8797843-3f61-4fa9-a155-ab0b21fb3858" width="52" height="30"></a>
27
+ <a href="https://github.com/2captcha/2captcha-java"><img src="https://github.com/user-attachments/assets/a3d923f6-4fec-4c07-ac50-e20da6370911" width="50" height="30"></a>
28
+ <a href="https://github.com/2captcha/2captcha-csharp"><img src="https://github.com/user-attachments/assets/f4d449de-780b-49ed-bb0a-b70c82ec4b32" width="38" height="30"></a>
29
+
30
+ # Python Module for 2Captcha API (captcha solver)
31
+
22
32
  The easiest way to quickly integrate the [2Captcha] captcha-solving service into your code and automate the solving of any type of captcha.
33
+ Examples of API requests for different captcha types are available on the [Python captcha solver](https://2captcha.com/lang/python) page.
23
34
 
24
- - [Python Module for 2Captcha API](#python-module-for-2captcha-api)
35
+ - [Python Module for 2Captcha API (captcha solver)](#python-module-for-2captcha-api-captcha-solver)
25
36
  - [Installation](#installation)
26
37
  - [Configuration](#configuration)
27
38
  - [TwoCaptcha instance options](#twocaptcha-instance-options)
@@ -50,6 +61,8 @@ The easiest way to quickly integrate the [2Captcha] captcha-solving service into
50
61
  - [Friendly Captcha](#friendly-captcha)
51
62
  - [Cutcaptcha](#cutcaptcha)
52
63
  - [Tencent](#tencent)
64
+ - [Datadome](#datadome)
65
+ - [CyberSiARA](#cybersiara)
53
66
  - [Other methods](#other-methods)
54
67
  - [send / get_result](#send--get_result)
55
68
  - [balance](#balance)
@@ -58,7 +71,12 @@ The easiest way to quickly integrate the [2Captcha] captcha-solving service into
58
71
  - [Proxies](#proxies)
59
72
  - [Async calls](#async-calls)
60
73
  - [Examples](#examples)
74
+ - [Examples using Selenium](#examples-using-selenium)
61
75
  - [Useful articles](#useful-articles)
76
+ - [Get in touch](#get-in-touch)
77
+ - [Join the team 👪](#join-the-team-)
78
+ - [License](#license)
79
+ - [Graphics and Trademarks](#graphics-and-trademarks)
62
80
 
63
81
  ## Installation
64
82
 
@@ -411,6 +429,38 @@ result = solver.tencent(app_id="197326679",
411
429
  param1=..., ...)
412
430
  ```
413
431
 
432
+ ### DataDome
433
+
434
+ <sup>[API method description.](https://2captcha.com/2captcha-api#datadome)</sup>
435
+
436
+ Use this method to solve DataDome captcha.
437
+
438
+ > [!IMPORTANT]
439
+ > To solve the DataDome captcha, you must use a proxy. It is recommended to use [residential proxies].
440
+
441
+ ```python
442
+ result = solver.datadome(captcha_url="https://geo.captcha-delivery.com/captcha/?initialCid=...",
443
+ pageurl="https://mysite.com/page/with/datadome",
444
+ userAgent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36",
445
+ proxy={
446
+ 'type': 'HTTP',
447
+ 'uri': 'login:password@IP_address:PORT'
448
+ },
449
+ param1=..., ...)
450
+ ```
451
+
452
+ ### CyberSiARA
453
+
454
+ <sup>[API method description.](https://2captcha.com/2captcha-api#cybersiara)</sup>
455
+
456
+ Use this method to solve CyberSiARA. Returns a token.
457
+ ```python
458
+ result = solver.cybersiara(master_url_id='tpjOCKjjpdzv3d8Ub2E9COEWKt1vl1Mv',
459
+ pageurl='https://demo.mycybersiara.com/',
460
+ userAgent='Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36',
461
+ param1=..., ...)
462
+ ```
463
+
414
464
  ## Other methods
415
465
 
416
466
  ### send / get_result
@@ -484,7 +534,8 @@ except TimeoutException as e:
484
534
  ## Proxies
485
535
 
486
536
  You can pass your proxy as an additional argument for the following methods: recaptcha, funcaptcha, geetest, geetest v4, hcaptcha,
487
- keycaptcha, capy puzzle, lemin, atbcaptcha, turnstile, amazon waf, mtcaptcha, friendly captcha, cutcaptcha.
537
+ keycaptcha, capy puzzle, lemin, atbcaptcha, turnstile, amazon waf, mtcaptcha, friendly captcha, cutcaptcha, Tencent, DataDome, cybersiara.
538
+
488
539
 
489
540
  The proxy will be forwarded to the API to solve the captcha.
490
541
 
@@ -519,11 +570,35 @@ captcha_result = asyncio.run(captchaSolver(image))
519
570
  ## Examples
520
571
  Examples of solving all supported captcha types are located in the [examples] directory.
521
572
 
573
+ ## Examples using Selenium
574
+ 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.
575
+
522
576
  ## Useful articles
523
577
 
524
578
  - Amazon captcha solver: Code example for bypassing the [Amazon captcha](https://2captcha.com/blog/amazon-captcha-solving)
525
579
  - [Captcha bypass in Selenium](https://2captcha.com/blog/captcha-bypass-in-selenium)
526
580
 
581
+ ## Get in touch
582
+
583
+ <a href="mailto:support@2captcha.com"><img src="https://github.com/user-attachments/assets/539df209-7c85-4fa5-84b4-fc22ab93fac7" width="80" height="30"></a>
584
+ <a href="https://2captcha.com/support/tickets/new"><img src="https://github.com/user-attachments/assets/be044db5-2e67-46c6-8c81-04b78bd99650" width="81" height="30"></a>
585
+
586
+ ## Join the team 👪
587
+
588
+ There are many ways to contribute, of which development is only one! Find your next job. Open positions: AI experts, scrapers, developers, technical support, and much more! 😍
589
+
590
+ <a href="mailto:job@2captcha.com"><img src="https://github.com/user-attachments/assets/36d23ef5-7866-4841-8e17-261cc8a4e033" width="80" height="30"></a>
591
+
592
+
593
+ ## License
594
+
595
+ The code in this repository is licensed under the MIT License. See the [LICENSE](./LICENSE) file for more details.
596
+
597
+ ### Graphics and Trademarks
598
+
599
+ The graphics and trademarks included in this repository are not covered by the MIT License. Please contact <a href="mailto:support@2captcha.com">support</a> for permissions regarding the use of these materials.
600
+
601
+
527
602
  <!-- Shared links for README.md -->
528
603
  [2Captcha]: https://2captcha.com/
529
604
  [2captcha software catalog]: https://2captcha.com/software
@@ -535,3 +610,4 @@ Examples of solving all supported captcha types are located in the [examples] di
535
610
  [Buy residential proxies]: https://2captcha.com/proxy/residential-proxies
536
611
  [Quick start]: https://2captcha.com/proxy?openAddTrafficModal=true
537
612
  [examples]: ./examples
613
+ [residential proxies]: https://2captcha.com/proxy/residential-proxies
@@ -1,7 +1,18 @@
1
- # Python Module for 2Captcha API
1
+ <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>
2
+ <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>
3
+ <a href="https://github.com/2captcha/2captcha-go"><img src="https://github.com/user-attachments/assets/ab22182e-6cb2-41fa-91f4-d5e89c6d7c6f" width="63" height="30"></a>
4
+ <a href="https://github.com/2captcha/2captcha-ruby"><img src="https://github.com/user-attachments/assets/0270d56f-79b0-4c95-9b09-4de89579914b" width="75" height="30"></a>
5
+ <a href="https://github.com/2captcha/2captcha-cpp"><img src="https://github.com/user-attachments/assets/36de8512-acfd-44fb-bb1f-b7c793a3f926" width="45" height="30"></a>
6
+ <a href="https://github.com/2captcha/2captcha-php"><img src="https://github.com/user-attachments/assets/e8797843-3f61-4fa9-a155-ab0b21fb3858" width="52" height="30"></a>
7
+ <a href="https://github.com/2captcha/2captcha-java"><img src="https://github.com/user-attachments/assets/a3d923f6-4fec-4c07-ac50-e20da6370911" width="50" height="30"></a>
8
+ <a href="https://github.com/2captcha/2captcha-csharp"><img src="https://github.com/user-attachments/assets/f4d449de-780b-49ed-bb0a-b70c82ec4b32" width="38" height="30"></a>
9
+
10
+ # Python Module for 2Captcha API (captcha solver)
11
+
2
12
  The easiest way to quickly integrate the [2Captcha] captcha-solving service into your code and automate the solving of any type of captcha.
13
+ Examples of API requests for different captcha types are available on the [Python captcha solver](https://2captcha.com/lang/python) page.
3
14
 
4
- - [Python Module for 2Captcha API](#python-module-for-2captcha-api)
15
+ - [Python Module for 2Captcha API (captcha solver)](#python-module-for-2captcha-api-captcha-solver)
5
16
  - [Installation](#installation)
6
17
  - [Configuration](#configuration)
7
18
  - [TwoCaptcha instance options](#twocaptcha-instance-options)
@@ -30,6 +41,8 @@ The easiest way to quickly integrate the [2Captcha] captcha-solving service into
30
41
  - [Friendly Captcha](#friendly-captcha)
31
42
  - [Cutcaptcha](#cutcaptcha)
32
43
  - [Tencent](#tencent)
44
+ - [Datadome](#datadome)
45
+ - [CyberSiARA](#cybersiara)
33
46
  - [Other methods](#other-methods)
34
47
  - [send / get_result](#send--get_result)
35
48
  - [balance](#balance)
@@ -38,7 +51,12 @@ The easiest way to quickly integrate the [2Captcha] captcha-solving service into
38
51
  - [Proxies](#proxies)
39
52
  - [Async calls](#async-calls)
40
53
  - [Examples](#examples)
54
+ - [Examples using Selenium](#examples-using-selenium)
41
55
  - [Useful articles](#useful-articles)
56
+ - [Get in touch](#get-in-touch)
57
+ - [Join the team 👪](#join-the-team-)
58
+ - [License](#license)
59
+ - [Graphics and Trademarks](#graphics-and-trademarks)
42
60
 
43
61
  ## Installation
44
62
 
@@ -391,6 +409,38 @@ result = solver.tencent(app_id="197326679",
391
409
  param1=..., ...)
392
410
  ```
393
411
 
412
+ ### DataDome
413
+
414
+ <sup>[API method description.](https://2captcha.com/2captcha-api#datadome)</sup>
415
+
416
+ Use this method to solve DataDome captcha.
417
+
418
+ > [!IMPORTANT]
419
+ > To solve the DataDome captcha, you must use a proxy. It is recommended to use [residential proxies].
420
+
421
+ ```python
422
+ result = solver.datadome(captcha_url="https://geo.captcha-delivery.com/captcha/?initialCid=...",
423
+ pageurl="https://mysite.com/page/with/datadome",
424
+ userAgent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36",
425
+ proxy={
426
+ 'type': 'HTTP',
427
+ 'uri': 'login:password@IP_address:PORT'
428
+ },
429
+ param1=..., ...)
430
+ ```
431
+
432
+ ### CyberSiARA
433
+
434
+ <sup>[API method description.](https://2captcha.com/2captcha-api#cybersiara)</sup>
435
+
436
+ Use this method to solve CyberSiARA. Returns a token.
437
+ ```python
438
+ result = solver.cybersiara(master_url_id='tpjOCKjjpdzv3d8Ub2E9COEWKt1vl1Mv',
439
+ pageurl='https://demo.mycybersiara.com/',
440
+ userAgent='Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36',
441
+ param1=..., ...)
442
+ ```
443
+
394
444
  ## Other methods
395
445
 
396
446
  ### send / get_result
@@ -464,7 +514,8 @@ except TimeoutException as e:
464
514
  ## Proxies
465
515
 
466
516
  You can pass your proxy as an additional argument for the following methods: recaptcha, funcaptcha, geetest, geetest v4, hcaptcha,
467
- keycaptcha, capy puzzle, lemin, atbcaptcha, turnstile, amazon waf, mtcaptcha, friendly captcha, cutcaptcha.
517
+ keycaptcha, capy puzzle, lemin, atbcaptcha, turnstile, amazon waf, mtcaptcha, friendly captcha, cutcaptcha, Tencent, DataDome, cybersiara.
518
+
468
519
 
469
520
  The proxy will be forwarded to the API to solve the captcha.
470
521
 
@@ -499,11 +550,35 @@ captcha_result = asyncio.run(captchaSolver(image))
499
550
  ## Examples
500
551
  Examples of solving all supported captcha types are located in the [examples] directory.
501
552
 
553
+ ## Examples using Selenium
554
+ 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.
555
+
502
556
  ## Useful articles
503
557
 
504
558
  - Amazon captcha solver: Code example for bypassing the [Amazon captcha](https://2captcha.com/blog/amazon-captcha-solving)
505
559
  - [Captcha bypass in Selenium](https://2captcha.com/blog/captcha-bypass-in-selenium)
506
560
 
561
+ ## Get in touch
562
+
563
+ <a href="mailto:support@2captcha.com"><img src="https://github.com/user-attachments/assets/539df209-7c85-4fa5-84b4-fc22ab93fac7" width="80" height="30"></a>
564
+ <a href="https://2captcha.com/support/tickets/new"><img src="https://github.com/user-attachments/assets/be044db5-2e67-46c6-8c81-04b78bd99650" width="81" height="30"></a>
565
+
566
+ ## Join the team 👪
567
+
568
+ There are many ways to contribute, of which development is only one! Find your next job. Open positions: AI experts, scrapers, developers, technical support, and much more! 😍
569
+
570
+ <a href="mailto:job@2captcha.com"><img src="https://github.com/user-attachments/assets/36d23ef5-7866-4841-8e17-261cc8a4e033" width="80" height="30"></a>
571
+
572
+
573
+ ## License
574
+
575
+ The code in this repository is licensed under the MIT License. See the [LICENSE](./LICENSE) file for more details.
576
+
577
+ ### Graphics and Trademarks
578
+
579
+ The graphics and trademarks included in this repository are not covered by the MIT License. Please contact <a href="mailto:support@2captcha.com">support</a> for permissions regarding the use of these materials.
580
+
581
+
507
582
  <!-- Shared links for README.md -->
508
583
  [2Captcha]: https://2captcha.com/
509
584
  [2captcha software catalog]: https://2captcha.com/software
@@ -515,3 +590,4 @@ Examples of solving all supported captcha types are located in the [examples] di
515
590
  [Buy residential proxies]: https://2captcha.com/proxy/residential-proxies
516
591
  [Quick start]: https://2captcha.com/proxy?openAddTrafficModal=true
517
592
  [examples]: ./examples
593
+ [residential proxies]: https://2captcha.com/proxy/residential-proxies
@@ -36,6 +36,6 @@ setup(name='2captcha-python',
36
36
  '2captcha', 'captcha', 'api', 'captcha solver', 'reCAPTCHA', 'hCaptcha',
37
37
  'FunCaptcha', 'Geetest', 'image captcha', 'Coordinates', 'Click Captcha',
38
38
  'Geetest V4', 'Lemin captcha', 'Amazon WAF', 'Cloudflare Turnstile',
39
- 'Capy Puzzle', 'MTCaptcha', 'Friendly Captcha', 'Tencent'],
39
+ 'Capy Puzzle', 'MTCaptcha', 'Friendly Captcha', 'Tencent', 'Cutcaptcha', 'DataDome', 'cybersiara'],
40
40
  python_requires='>=3.6',
41
41
  test_suite='tests')
@@ -0,0 +1,32 @@
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 CybersiaraTest(AbstractTest):
12
+
13
+ def test_all_params(self):
14
+ params = {
15
+ 'master_url_id': 'tpjOCKjjpdzv3d8Ub2E9COEWKt1vl1Mv',
16
+ 'pageurl': 'https://demo.mycybersiara.com/',
17
+ 'userAgent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Safari/537.36',
18
+ }
19
+
20
+ sends = {
21
+ 'method': 'cybersiara',
22
+ 'master_url_id': 'tpjOCKjjpdzv3d8Ub2E9COEWKt1vl1Mv',
23
+ 'pageurl': 'https://demo.mycybersiara.com/',
24
+ 'userAgent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Safari/537.36',
25
+ }
26
+
27
+ return self.send_return(sends, self.solver.cybersiara, **params)
28
+
29
+
30
+ if __name__ == '__main__':
31
+ unittest.main()
32
+
@@ -0,0 +1,34 @@
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 DatadomeTest(AbstractTest):
12
+
13
+ def test_all_params(self):
14
+ params = {
15
+ 'captcha_url': 'https://geo.captcha-delivery.com/captcha/?initialCid=AHrlqAAAAAMAZirHgKBVrxwAsVuKlQ%3D%3D&c',
16
+ 'pageurl': 'https://mysite.com/page/with/datadome',
17
+ 'userAgent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36',
18
+ 'proxy': {'type': 'HTTP', 'uri': 'login:password@IP_address:PORT'}
19
+ }
20
+
21
+ sends = {
22
+ 'method': 'datadome',
23
+ 'captcha_url': 'https://geo.captcha-delivery.com/captcha/?initialCid=AHrlqAAAAAMAZirHgKBVrxwAsVuKlQ%3D%3D&c',
24
+ 'pageurl': 'https://mysite.com/page/with/datadome',
25
+ 'userAgent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36',
26
+ 'proxy': 'login:password@IP_address:PORT',
27
+ 'proxytype': 'HTTP'
28
+ }
29
+
30
+ return self.send_return(sends, self.solver.datadome, **params)
31
+
32
+
33
+ if __name__ == '__main__':
34
+ unittest.main()
@@ -12,4 +12,4 @@ support@2captcha.com
12
12
  """
13
13
 
14
14
  __author__ = '2captcha'
15
- __version__ = '1.2.8'
15
+ __version__ = '1.4.0'
@@ -810,6 +810,50 @@ class TwoCaptcha():
810
810
  **kwargs)
811
811
  return result
812
812
 
813
+ def datadome(self, captcha_url, pageurl, userAgent, proxy, **kwargs):
814
+ """Wrapper for solving DataDome Captcha.
815
+
816
+ Parameters
817
+ __________
818
+ captcha_url: str
819
+ The value of the 'src' parameter for the 'iframe' element containing the captcha on the page.
820
+ pageurl: str
821
+ Full URL of the page that triggers the captcha when you go to it.
822
+ userAgent: str
823
+ User-Agent of the browser that will be used by the employee when loading the captcha.
824
+ proxy : dict
825
+ {'type': 'HTTPS', 'uri': 'login:password@IP_address:PORT'}.
826
+ """
827
+
828
+ result = self.solve(method='datadome',
829
+ captcha_url=captcha_url,
830
+ pageurl=pageurl,
831
+ userAgent=userAgent,
832
+ proxy=proxy,
833
+ **kwargs)
834
+ return result
835
+
836
+ def cybersiara(self, master_url_id, pageurl, userAgent, **kwargs):
837
+ '''Wrapper for solving CyberSiARA captcha.
838
+
839
+ Parameters
840
+ __________
841
+ master_url_id : str
842
+ The value of the MasterUrlId parameter from the request to API/CyberSiara/GetCyberSiara.
843
+ pageurl : str
844
+ Full URL of the page with captcha.
845
+ userAgent : str
846
+ User-Agent of your browser.
847
+ proxy : dict, optional
848
+ {'type': 'HTTPS', 'uri': 'login:password@IP_address:PORT'}.
849
+ '''
850
+ result = self.solve(method='cybersiara',
851
+ master_url_id=master_url_id,
852
+ pageurl=pageurl,
853
+ userAgent=userAgent,
854
+ **kwargs)
855
+ return result
856
+
813
857
  def solve(self, timeout=0, polling_interval=0, **kwargs):
814
858
  '''Sends captcha, receives result.
815
859
 
File without changes