2captcha-python 1.2.8__tar.gz → 1.3.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.
- {2captcha_python-1.2.8 → 2captcha_python-1.3.0}/2captcha_python.egg-info/PKG-INFO +67 -5
- {2captcha_python-1.2.8 → 2captcha_python-1.3.0}/2captcha_python.egg-info/SOURCES.txt +1 -0
- {2captcha_python-1.2.8 → 2captcha_python-1.3.0}/PKG-INFO +67 -5
- {2captcha_python-1.2.8 → 2captcha_python-1.3.0}/README.md +65 -3
- {2captcha_python-1.2.8 → 2captcha_python-1.3.0}/setup.py +1 -1
- 2captcha_python-1.3.0/tests/test_datadome.py +34 -0
- {2captcha_python-1.2.8 → 2captcha_python-1.3.0}/twocaptcha/__init__.py +1 -1
- {2captcha_python-1.2.8 → 2captcha_python-1.3.0}/twocaptcha/solver.py +24 -0
- {2captcha_python-1.2.8 → 2captcha_python-1.3.0}/2captcha_python.egg-info/dependency_links.txt +0 -0
- {2captcha_python-1.2.8 → 2captcha_python-1.3.0}/2captcha_python.egg-info/requires.txt +0 -0
- {2captcha_python-1.2.8 → 2captcha_python-1.3.0}/2captcha_python.egg-info/top_level.txt +0 -0
- {2captcha_python-1.2.8 → 2captcha_python-1.3.0}/LICENSE +0 -0
- {2captcha_python-1.2.8 → 2captcha_python-1.3.0}/setup.cfg +0 -0
- {2captcha_python-1.2.8 → 2captcha_python-1.3.0}/tests/test_amazon_waf.py +0 -0
- {2captcha_python-1.2.8 → 2captcha_python-1.3.0}/tests/test_atb_captcha.py +0 -0
- {2captcha_python-1.2.8 → 2captcha_python-1.3.0}/tests/test_canvas.py +0 -0
- {2captcha_python-1.2.8 → 2captcha_python-1.3.0}/tests/test_capy.py +0 -0
- {2captcha_python-1.2.8 → 2captcha_python-1.3.0}/tests/test_coordinates.py +0 -0
- {2captcha_python-1.2.8 → 2captcha_python-1.3.0}/tests/test_cutcaptcha.py +0 -0
- {2captcha_python-1.2.8 → 2captcha_python-1.3.0}/tests/test_friendly_captcha.py +0 -0
- {2captcha_python-1.2.8 → 2captcha_python-1.3.0}/tests/test_funcaptcha.py +0 -0
- {2captcha_python-1.2.8 → 2captcha_python-1.3.0}/tests/test_geetest.py +0 -0
- {2captcha_python-1.2.8 → 2captcha_python-1.3.0}/tests/test_geetest_v4.py +0 -0
- {2captcha_python-1.2.8 → 2captcha_python-1.3.0}/tests/test_grid.py +0 -0
- {2captcha_python-1.2.8 → 2captcha_python-1.3.0}/tests/test_hcaptcha.py +0 -0
- {2captcha_python-1.2.8 → 2captcha_python-1.3.0}/tests/test_keycaptcha.py +0 -0
- {2captcha_python-1.2.8 → 2captcha_python-1.3.0}/tests/test_lemin.py +0 -0
- {2captcha_python-1.2.8 → 2captcha_python-1.3.0}/tests/test_mtcaptcha.py +0 -0
- {2captcha_python-1.2.8 → 2captcha_python-1.3.0}/tests/test_normal.py +0 -0
- {2captcha_python-1.2.8 → 2captcha_python-1.3.0}/tests/test_recaptcha.py +0 -0
- {2captcha_python-1.2.8 → 2captcha_python-1.3.0}/tests/test_rotate.py +0 -0
- {2captcha_python-1.2.8 → 2captcha_python-1.3.0}/tests/test_tencent.py +0 -0
- {2captcha_python-1.2.8 → 2captcha_python-1.3.0}/tests/test_text.py +0 -0
- {2captcha_python-1.2.8 → 2captcha_python-1.3.0}/tests/test_turnstile.py +0 -0
- {2captcha_python-1.2.8 → 2captcha_python-1.3.0}/twocaptcha/api.py +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: 2captcha-python
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.3.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
|
|
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
|
-
|
|
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,7 @@ 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)
|
|
53
65
|
- [Other methods](#other-methods)
|
|
54
66
|
- [send / get_result](#send--get_result)
|
|
55
67
|
- [balance](#balance)
|
|
@@ -58,7 +70,12 @@ The easiest way to quickly integrate the [2Captcha] captcha-solving service into
|
|
|
58
70
|
- [Proxies](#proxies)
|
|
59
71
|
- [Async calls](#async-calls)
|
|
60
72
|
- [Examples](#examples)
|
|
73
|
+
- [Examples using Selenium](#examples-using-selenium)
|
|
61
74
|
- [Useful articles](#useful-articles)
|
|
75
|
+
- [Get in touch](#get-in-touch)
|
|
76
|
+
- [Join the team 👪](#join-the-team-)
|
|
77
|
+
- [License](#license)
|
|
78
|
+
- [Graphics and Trademarks](#graphics-and-trademarks)
|
|
62
79
|
|
|
63
80
|
## Installation
|
|
64
81
|
|
|
@@ -411,6 +428,26 @@ result = solver.tencent(app_id="197326679",
|
|
|
411
428
|
param1=..., ...)
|
|
412
429
|
```
|
|
413
430
|
|
|
431
|
+
### DataDome
|
|
432
|
+
|
|
433
|
+
<sup>[API method description.](https://2captcha.com/2captcha-api#datadome)</sup>
|
|
434
|
+
|
|
435
|
+
Use this method to solve DataDome captcha.
|
|
436
|
+
|
|
437
|
+
> [!IMPORTANT]
|
|
438
|
+
> To solve the DataDome captcha, you must use a proxy. It is recommended to use [residential proxies].
|
|
439
|
+
|
|
440
|
+
```python
|
|
441
|
+
result = solver.datadome(captcha_url="https://geo.captcha-delivery.com/captcha/?initialCid=...",
|
|
442
|
+
pageurl="https://mysite.com/page/with/datadome",
|
|
443
|
+
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",
|
|
444
|
+
proxy={
|
|
445
|
+
'type': 'HTTP',
|
|
446
|
+
'uri': 'login:password@IP_address:PORT'
|
|
447
|
+
},
|
|
448
|
+
param1=..., ...)
|
|
449
|
+
```
|
|
450
|
+
|
|
414
451
|
## Other methods
|
|
415
452
|
|
|
416
453
|
### send / get_result
|
|
@@ -484,7 +521,7 @@ except TimeoutException as e:
|
|
|
484
521
|
## Proxies
|
|
485
522
|
|
|
486
523
|
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.
|
|
524
|
+
keycaptcha, capy puzzle, lemin, atbcaptcha, turnstile, amazon waf, mtcaptcha, friendly captcha, cutcaptcha, Tencent, DataDome.
|
|
488
525
|
|
|
489
526
|
The proxy will be forwarded to the API to solve the captcha.
|
|
490
527
|
|
|
@@ -519,11 +556,35 @@ captcha_result = asyncio.run(captchaSolver(image))
|
|
|
519
556
|
## Examples
|
|
520
557
|
Examples of solving all supported captcha types are located in the [examples] directory.
|
|
521
558
|
|
|
559
|
+
## Examples using Selenium
|
|
560
|
+
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.
|
|
561
|
+
|
|
522
562
|
## Useful articles
|
|
523
563
|
|
|
524
564
|
- Amazon captcha solver: Code example for bypassing the [Amazon captcha](https://2captcha.com/blog/amazon-captcha-solving)
|
|
525
565
|
- [Captcha bypass in Selenium](https://2captcha.com/blog/captcha-bypass-in-selenium)
|
|
526
566
|
|
|
567
|
+
## Get in touch
|
|
568
|
+
|
|
569
|
+
<a href="mailto:support@2captcha.com"><img src="https://github.com/user-attachments/assets/539df209-7c85-4fa5-84b4-fc22ab93fac7" width="80" height="30"></a>
|
|
570
|
+
<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>
|
|
571
|
+
|
|
572
|
+
## Join the team 👪
|
|
573
|
+
|
|
574
|
+
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! 😍
|
|
575
|
+
|
|
576
|
+
<a href="mailto:job@2captcha.com"><img src="https://github.com/user-attachments/assets/36d23ef5-7866-4841-8e17-261cc8a4e033" width="80" height="30"></a>
|
|
577
|
+
|
|
578
|
+
|
|
579
|
+
## License
|
|
580
|
+
|
|
581
|
+
The code in this repository is licensed under the MIT License. See the [LICENSE](./LICENSE) file for more details.
|
|
582
|
+
|
|
583
|
+
### Graphics and Trademarks
|
|
584
|
+
|
|
585
|
+
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.
|
|
586
|
+
|
|
587
|
+
|
|
527
588
|
<!-- Shared links for README.md -->
|
|
528
589
|
[2Captcha]: https://2captcha.com/
|
|
529
590
|
[2captcha software catalog]: https://2captcha.com/software
|
|
@@ -535,3 +596,4 @@ Examples of solving all supported captcha types are located in the [examples] di
|
|
|
535
596
|
[Buy residential proxies]: https://2captcha.com/proxy/residential-proxies
|
|
536
597
|
[Quick start]: https://2captcha.com/proxy?openAddTrafficModal=true
|
|
537
598
|
[examples]: ./examples
|
|
599
|
+
[residential proxies]: https://2captcha.com/proxy/residential-proxies
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: 2captcha-python
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.3.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
|
|
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
|
-
|
|
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,7 @@ 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)
|
|
53
65
|
- [Other methods](#other-methods)
|
|
54
66
|
- [send / get_result](#send--get_result)
|
|
55
67
|
- [balance](#balance)
|
|
@@ -58,7 +70,12 @@ The easiest way to quickly integrate the [2Captcha] captcha-solving service into
|
|
|
58
70
|
- [Proxies](#proxies)
|
|
59
71
|
- [Async calls](#async-calls)
|
|
60
72
|
- [Examples](#examples)
|
|
73
|
+
- [Examples using Selenium](#examples-using-selenium)
|
|
61
74
|
- [Useful articles](#useful-articles)
|
|
75
|
+
- [Get in touch](#get-in-touch)
|
|
76
|
+
- [Join the team 👪](#join-the-team-)
|
|
77
|
+
- [License](#license)
|
|
78
|
+
- [Graphics and Trademarks](#graphics-and-trademarks)
|
|
62
79
|
|
|
63
80
|
## Installation
|
|
64
81
|
|
|
@@ -411,6 +428,26 @@ result = solver.tencent(app_id="197326679",
|
|
|
411
428
|
param1=..., ...)
|
|
412
429
|
```
|
|
413
430
|
|
|
431
|
+
### DataDome
|
|
432
|
+
|
|
433
|
+
<sup>[API method description.](https://2captcha.com/2captcha-api#datadome)</sup>
|
|
434
|
+
|
|
435
|
+
Use this method to solve DataDome captcha.
|
|
436
|
+
|
|
437
|
+
> [!IMPORTANT]
|
|
438
|
+
> To solve the DataDome captcha, you must use a proxy. It is recommended to use [residential proxies].
|
|
439
|
+
|
|
440
|
+
```python
|
|
441
|
+
result = solver.datadome(captcha_url="https://geo.captcha-delivery.com/captcha/?initialCid=...",
|
|
442
|
+
pageurl="https://mysite.com/page/with/datadome",
|
|
443
|
+
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",
|
|
444
|
+
proxy={
|
|
445
|
+
'type': 'HTTP',
|
|
446
|
+
'uri': 'login:password@IP_address:PORT'
|
|
447
|
+
},
|
|
448
|
+
param1=..., ...)
|
|
449
|
+
```
|
|
450
|
+
|
|
414
451
|
## Other methods
|
|
415
452
|
|
|
416
453
|
### send / get_result
|
|
@@ -484,7 +521,7 @@ except TimeoutException as e:
|
|
|
484
521
|
## Proxies
|
|
485
522
|
|
|
486
523
|
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.
|
|
524
|
+
keycaptcha, capy puzzle, lemin, atbcaptcha, turnstile, amazon waf, mtcaptcha, friendly captcha, cutcaptcha, Tencent, DataDome.
|
|
488
525
|
|
|
489
526
|
The proxy will be forwarded to the API to solve the captcha.
|
|
490
527
|
|
|
@@ -519,11 +556,35 @@ captcha_result = asyncio.run(captchaSolver(image))
|
|
|
519
556
|
## Examples
|
|
520
557
|
Examples of solving all supported captcha types are located in the [examples] directory.
|
|
521
558
|
|
|
559
|
+
## Examples using Selenium
|
|
560
|
+
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.
|
|
561
|
+
|
|
522
562
|
## Useful articles
|
|
523
563
|
|
|
524
564
|
- Amazon captcha solver: Code example for bypassing the [Amazon captcha](https://2captcha.com/blog/amazon-captcha-solving)
|
|
525
565
|
- [Captcha bypass in Selenium](https://2captcha.com/blog/captcha-bypass-in-selenium)
|
|
526
566
|
|
|
567
|
+
## Get in touch
|
|
568
|
+
|
|
569
|
+
<a href="mailto:support@2captcha.com"><img src="https://github.com/user-attachments/assets/539df209-7c85-4fa5-84b4-fc22ab93fac7" width="80" height="30"></a>
|
|
570
|
+
<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>
|
|
571
|
+
|
|
572
|
+
## Join the team 👪
|
|
573
|
+
|
|
574
|
+
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! 😍
|
|
575
|
+
|
|
576
|
+
<a href="mailto:job@2captcha.com"><img src="https://github.com/user-attachments/assets/36d23ef5-7866-4841-8e17-261cc8a4e033" width="80" height="30"></a>
|
|
577
|
+
|
|
578
|
+
|
|
579
|
+
## License
|
|
580
|
+
|
|
581
|
+
The code in this repository is licensed under the MIT License. See the [LICENSE](./LICENSE) file for more details.
|
|
582
|
+
|
|
583
|
+
### Graphics and Trademarks
|
|
584
|
+
|
|
585
|
+
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.
|
|
586
|
+
|
|
587
|
+
|
|
527
588
|
<!-- Shared links for README.md -->
|
|
528
589
|
[2Captcha]: https://2captcha.com/
|
|
529
590
|
[2captcha software catalog]: https://2captcha.com/software
|
|
@@ -535,3 +596,4 @@ Examples of solving all supported captcha types are located in the [examples] di
|
|
|
535
596
|
[Buy residential proxies]: https://2captcha.com/proxy/residential-proxies
|
|
536
597
|
[Quick start]: https://2captcha.com/proxy?openAddTrafficModal=true
|
|
537
598
|
[examples]: ./examples
|
|
599
|
+
[residential proxies]: https://2captcha.com/proxy/residential-proxies
|
|
@@ -1,7 +1,18 @@
|
|
|
1
|
-
|
|
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,7 @@ 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)
|
|
33
45
|
- [Other methods](#other-methods)
|
|
34
46
|
- [send / get_result](#send--get_result)
|
|
35
47
|
- [balance](#balance)
|
|
@@ -38,7 +50,12 @@ The easiest way to quickly integrate the [2Captcha] captcha-solving service into
|
|
|
38
50
|
- [Proxies](#proxies)
|
|
39
51
|
- [Async calls](#async-calls)
|
|
40
52
|
- [Examples](#examples)
|
|
53
|
+
- [Examples using Selenium](#examples-using-selenium)
|
|
41
54
|
- [Useful articles](#useful-articles)
|
|
55
|
+
- [Get in touch](#get-in-touch)
|
|
56
|
+
- [Join the team 👪](#join-the-team-)
|
|
57
|
+
- [License](#license)
|
|
58
|
+
- [Graphics and Trademarks](#graphics-and-trademarks)
|
|
42
59
|
|
|
43
60
|
## Installation
|
|
44
61
|
|
|
@@ -391,6 +408,26 @@ result = solver.tencent(app_id="197326679",
|
|
|
391
408
|
param1=..., ...)
|
|
392
409
|
```
|
|
393
410
|
|
|
411
|
+
### DataDome
|
|
412
|
+
|
|
413
|
+
<sup>[API method description.](https://2captcha.com/2captcha-api#datadome)</sup>
|
|
414
|
+
|
|
415
|
+
Use this method to solve DataDome captcha.
|
|
416
|
+
|
|
417
|
+
> [!IMPORTANT]
|
|
418
|
+
> To solve the DataDome captcha, you must use a proxy. It is recommended to use [residential proxies].
|
|
419
|
+
|
|
420
|
+
```python
|
|
421
|
+
result = solver.datadome(captcha_url="https://geo.captcha-delivery.com/captcha/?initialCid=...",
|
|
422
|
+
pageurl="https://mysite.com/page/with/datadome",
|
|
423
|
+
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",
|
|
424
|
+
proxy={
|
|
425
|
+
'type': 'HTTP',
|
|
426
|
+
'uri': 'login:password@IP_address:PORT'
|
|
427
|
+
},
|
|
428
|
+
param1=..., ...)
|
|
429
|
+
```
|
|
430
|
+
|
|
394
431
|
## Other methods
|
|
395
432
|
|
|
396
433
|
### send / get_result
|
|
@@ -464,7 +501,7 @@ except TimeoutException as e:
|
|
|
464
501
|
## Proxies
|
|
465
502
|
|
|
466
503
|
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.
|
|
504
|
+
keycaptcha, capy puzzle, lemin, atbcaptcha, turnstile, amazon waf, mtcaptcha, friendly captcha, cutcaptcha, Tencent, DataDome.
|
|
468
505
|
|
|
469
506
|
The proxy will be forwarded to the API to solve the captcha.
|
|
470
507
|
|
|
@@ -499,11 +536,35 @@ captcha_result = asyncio.run(captchaSolver(image))
|
|
|
499
536
|
## Examples
|
|
500
537
|
Examples of solving all supported captcha types are located in the [examples] directory.
|
|
501
538
|
|
|
539
|
+
## Examples using Selenium
|
|
540
|
+
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.
|
|
541
|
+
|
|
502
542
|
## Useful articles
|
|
503
543
|
|
|
504
544
|
- Amazon captcha solver: Code example for bypassing the [Amazon captcha](https://2captcha.com/blog/amazon-captcha-solving)
|
|
505
545
|
- [Captcha bypass in Selenium](https://2captcha.com/blog/captcha-bypass-in-selenium)
|
|
506
546
|
|
|
547
|
+
## Get in touch
|
|
548
|
+
|
|
549
|
+
<a href="mailto:support@2captcha.com"><img src="https://github.com/user-attachments/assets/539df209-7c85-4fa5-84b4-fc22ab93fac7" width="80" height="30"></a>
|
|
550
|
+
<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>
|
|
551
|
+
|
|
552
|
+
## Join the team 👪
|
|
553
|
+
|
|
554
|
+
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! 😍
|
|
555
|
+
|
|
556
|
+
<a href="mailto:job@2captcha.com"><img src="https://github.com/user-attachments/assets/36d23ef5-7866-4841-8e17-261cc8a4e033" width="80" height="30"></a>
|
|
557
|
+
|
|
558
|
+
|
|
559
|
+
## License
|
|
560
|
+
|
|
561
|
+
The code in this repository is licensed under the MIT License. See the [LICENSE](./LICENSE) file for more details.
|
|
562
|
+
|
|
563
|
+
### Graphics and Trademarks
|
|
564
|
+
|
|
565
|
+
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.
|
|
566
|
+
|
|
567
|
+
|
|
507
568
|
<!-- Shared links for README.md -->
|
|
508
569
|
[2Captcha]: https://2captcha.com/
|
|
509
570
|
[2captcha software catalog]: https://2captcha.com/software
|
|
@@ -515,3 +576,4 @@ Examples of solving all supported captcha types are located in the [examples] di
|
|
|
515
576
|
[Buy residential proxies]: https://2captcha.com/proxy/residential-proxies
|
|
516
577
|
[Quick start]: https://2captcha.com/proxy?openAddTrafficModal=true
|
|
517
578
|
[examples]: ./examples
|
|
579
|
+
[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'],
|
|
40
40
|
python_requires='>=3.6',
|
|
41
41
|
test_suite='tests')
|
|
@@ -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()
|
|
@@ -810,6 +810,30 @@ 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
|
+
|
|
835
|
+
return result
|
|
836
|
+
|
|
813
837
|
def solve(self, timeout=0, polling_interval=0, **kwargs):
|
|
814
838
|
'''Sends captcha, receives result.
|
|
815
839
|
|
{2captcha_python-1.2.8 → 2captcha_python-1.3.0}/2captcha_python.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|