2captcha-python 1.2.7__py3-none-any.whl → 1.2.8__py3-none-any.whl

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.
@@ -1,20 +1,25 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: 2captcha-python
3
- Version: 1.2.7
3
+ Version: 1.2.8
4
4
  Summary: Python module for easy integration with 2Captcha API
5
5
  Home-page: https://github.com/2captcha/2captcha-python/
6
6
  Author: 2Captcha
7
7
  Author-email: info@2captcha.com
8
+ Keywords: 2captcha,captcha,api,captcha solver,reCAPTCHA,hCaptcha,FunCaptcha,Geetest,image captcha,Coordinates,Click Captcha,Geetest V4,Lemin captcha,Amazon WAF,Cloudflare Turnstile,Capy Puzzle,MTCaptcha,Friendly Captcha,Tencent
8
9
  Classifier: Programming Language :: Python :: 3
9
10
  Classifier: License :: OSI Approved :: MIT License
10
11
  Classifier: Operating System :: OS Independent
12
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
13
+ Classifier: Topic :: Scientific/Engineering :: Image Recognition
14
+ Classifier: Topic :: Utilities
15
+ Classifier: Intended Audience :: Developers
11
16
  Requires-Python: >=3.6
12
17
  Description-Content-Type: text/markdown
13
18
  License-File: LICENSE
14
19
  Requires-Dist: requests
15
20
 
16
21
  # Python Module for 2Captcha API
17
- The easiest way to quickly integrate the 2Captcha captcha-solving service into your code and automate the solving of any type of captcha.
22
+ The easiest way to quickly integrate the [2Captcha] captcha-solving service into your code and automate the solving of any type of captcha.
18
23
 
19
24
  - [Python Module for 2Captcha API](#python-module-for-2captcha-api)
20
25
  - [Installation](#installation)
@@ -29,8 +34,8 @@ The easiest way to quickly integrate the 2Captcha captcha-solving service into y
29
34
  - [reCAPTCHA v3](#recaptcha-v3)
30
35
  - [FunCaptcha](#funcaptcha)
31
36
  - [GeeTest](#geetest)
32
- - [hCaptcha](#hcaptcha)
33
37
  - [GeeTest v4](#geetest-v4)
38
+ - [hCaptcha](#hcaptcha)
34
39
  - [Lemin Cropped Captcha](#lemin-cropped-captcha)
35
40
  - [Cloudflare Turnstile](#cloudflare-turnstile)
36
41
  - [Amazon WAF](#amazon-waf)
@@ -49,10 +54,11 @@ The easiest way to quickly integrate the 2Captcha captcha-solving service into y
49
54
  - [send / get_result](#send--get_result)
50
55
  - [balance](#balance)
51
56
  - [report](#report)
52
- - [Error handling](#error-handling)
53
- - [Proxies](#proxies)
54
- - [Async calls](#async-calls)
57
+ - [Error handling](#error-handling)
58
+ - [Proxies](#proxies)
59
+ - [Async calls](#async-calls)
55
60
  - [Examples](#examples)
61
+ - [Useful articles](#useful-articles)
56
62
 
57
63
  ## Installation
58
64
 
@@ -89,16 +95,18 @@ solver = TwoCaptcha(**config)
89
95
 
90
96
  ### TwoCaptcha instance options
91
97
 
92
- | Option | Default value | Description |
93
- | ---------------- | -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
94
- | server | `2captcha.com` | API server. You can set it to `rucaptcha.com` if your account is registered there |
95
- | softId | - | your software ID obtained after publishing in [2captcha software catalog] |
96
- | callback | - | URL of your web server that receives the captcha recognition result. The URL should be first registered in [pingback settings] of your account |
98
+ | Option | Default value | Description |
99
+ | ---------------- | -------------- |--------------------------------------------------------------------------------------------------------------------------------------------------------|
100
+ | server | `2captcha.com` | API server. You can set it to `rucaptcha.com` if your account is registered there |
101
+ | softId | 4580 | your software ID obtained after publishing in [2captcha software catalog] |
102
+ | callback | - | URL of your web server that receives the captcha recognition result. The URL should be first registered in [pingback settings] of your account |
97
103
  | defaultTimeout | 120 | Polling timeout in seconds for all captcha types except reCAPTCHA. Defines how long the module tries to get the answer from the `res.php` API endpoint |
98
104
  | recaptchaTimeout | 600 | Polling timeout for reCAPTCHA in seconds. Defines how long the module tries to get the answer from the `res.php` API endpoint |
99
105
  | pollingInterval | 10 | Interval in seconds between requests to the `res.php` API endpoint. Setting values less than 5 seconds is not recommended |
100
106
 
101
- > **IMPORTANT:** Once `callback` is defined for the `TwoCaptcha` instance, all methods return only the captcha ID and DO NOT poll the API to get the result. The result will be sent to the callback URL.
107
+ > [!IMPORTANT]
108
+ > Once `callback` is defined for the `TwoCaptcha` instance, all methods return only the captcha ID and DO NOT poll the API to get the result. The result will be sent to the callback URL.
109
+
102
110
  To get the answer manually use [get_result method](#send--get_result)
103
111
 
104
112
  ## Solve captcha
@@ -234,7 +242,7 @@ result = solver.hcaptcha(sitekey='10000000-ffff-ffff-ffff-000000000001',
234
242
 
235
243
  <sup>[API method description.](https://2captcha.com/2captcha-api#lemin)</sup>
236
244
 
237
- Use this method to solve hCaptcha challenge. Returns JSON with an answer containing the following values: answer, challenge_id.
245
+ Use this method to solve the Lemin captcha. Returns JSON with an answer containing the following values: answer, challenge_id.
238
246
  ```python
239
247
  result = solver.lemin(captcha_id='CROPPED_1abcd2f_a1234b567c890d12ef3a456bc78d901d',
240
248
  div_id='lemin-cropped-captcha',
@@ -370,6 +378,10 @@ result = solver.mtcaptcha(sitekey='MTPublic-KzqLY1cKH',
370
378
  <sup>[API method description.](https://2captcha.com/2captcha-api#friendly-captcha)</sup>
371
379
 
372
380
  Friendly Captcha solving method. Returns a token.
381
+
382
+ > [!IMPORTANT]
383
+ > To successfully use the received token, the captcha widget must not be loaded on the page. To do this, you need to abort request to `/friendlycaptcha/...module.min.js` on the page. When the captcha widget is already loaded on the page, there is a high probability that the received token will not work.
384
+
373
385
  ```python
374
386
  result = solver.friendly_captcha(sitekey='FCMGEMUD2KTDSQ5H',
375
387
  url='https://friendlycaptcha.com/demo',
@@ -430,20 +442,27 @@ code = solver.get_result(id)
430
442
  ```
431
443
 
432
444
  ### balance
445
+
446
+ <sup>[API method description.](https://2captcha.com/2captcha-api#additional-methods)</sup>
447
+
433
448
  Use this method to get your account's balance
434
449
  ```python
435
450
  balance = solver.balance()
436
451
  ```
437
452
 
438
453
  ### report
454
+
455
+ <sup>[API method description.](https://2captcha.com/2captcha-api#complain)</sup>
456
+
439
457
  Use this method to report good or bad captcha answers.
440
458
  ```python
441
459
  solver.report(id, True) # captcha solved correctly
442
460
  solver.report(id, False) # captcha solved incorrectly
443
461
  ```
444
462
 
445
- ### Error handling
446
- In case of an error, the captcha solver throws an exception. It's important to properly handle these cases. We recommend using `try except` to handle exceptions.
463
+ ## Error handling
464
+ In case of an error, the captcha solver throws an exception. It's important to properly handle these cases. We recommend using `try except` to handle exceptions.
465
+ The list of all errors can be found in the [API documentation](https://2captcha.com/2captcha-api#list-of-inphp-errors).
447
466
  ```python
448
467
  try:
449
468
  result = solver.text('If tomorrow is Saturday, what day is today?')
@@ -462,7 +481,7 @@ except TimeoutException as e:
462
481
  ```
463
482
 
464
483
 
465
- ### Proxies
484
+ ## Proxies
466
485
 
467
486
  You can pass your proxy as an additional argument for the following methods: recaptcha, funcaptcha, geetest, geetest v4, hcaptcha,
468
487
  keycaptcha, capy puzzle, lemin, atbcaptcha, turnstile, amazon waf, mtcaptcha, friendly captcha, cutcaptcha.
@@ -478,7 +497,7 @@ proxy={
478
497
  }
479
498
  ```
480
499
 
481
- ### Async calls
500
+ ## Async calls
482
501
  You can also make async calls with [asyncio], for example:
483
502
 
484
503
  ```python
@@ -500,9 +519,14 @@ captcha_result = asyncio.run(captchaSolver(image))
500
519
  ## Examples
501
520
  Examples of solving all supported captcha types are located in the [examples] directory.
502
521
 
503
- ### Useful links
522
+ ## Useful articles
523
+
524
+ - Amazon captcha solver: Code example for bypassing the [Amazon captcha](https://2captcha.com/blog/amazon-captcha-solving)
525
+ - [Captcha bypass in Selenium](https://2captcha.com/blog/captcha-bypass-in-selenium)
526
+
527
+ <!-- Shared links for README.md -->
504
528
  [2Captcha]: https://2captcha.com/
505
- [2captcha sofware catalog]: https://2captcha.com/software
529
+ [2captcha software catalog]: https://2captcha.com/software
506
530
  [pingback settings]: https://2captcha.com/setting/pingback
507
531
  [post options]: https://2captcha.com/2captcha-api#normal_post
508
532
  [list of supported languages]: https://2captcha.com/2captcha-api#language
@@ -0,0 +1,8 @@
1
+ twocaptcha/__init__.py,sha256=-H_x8-E_gPYCaESBSUwnPugFmWl0M3QP-O9l3YWOuFY,473
2
+ twocaptcha/api.py,sha256=qgv1y4FpajF2QZZ_Nzd4_Dcm7Dhk4I1LMAGubydg8zA,2763
3
+ twocaptcha/solver.py,sha256=fenw4L5s-VGZMfBp5fNdv6F-mf1dEwBUfFo41SpcfUM,40918
4
+ 2captcha_python-1.2.8.dist-info/LICENSE,sha256=sbILKjQcxUC6dAvBbivnRX9YCshBI9XRvvk1LGkpMEo,1065
5
+ 2captcha_python-1.2.8.dist-info/METADATA,sha256=aU6AoBJF1Y3_KdpN5ly-8OGt9gpBbe8zj_RzWTmHMeQ,20871
6
+ 2captcha_python-1.2.8.dist-info/WHEEL,sha256=mguMlWGMX-VHnMpKOjjQidIo1ssRlCFu4a4mBpz1s2M,91
7
+ 2captcha_python-1.2.8.dist-info/top_level.txt,sha256=AvFZdM89oM6Vo97ZTxT9AxHWpwoO3_Qf5ORMV3NClFE,11
8
+ 2captcha_python-1.2.8.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.43.0)
2
+ Generator: setuptools (70.1.1)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
twocaptcha/__init__.py CHANGED
@@ -12,4 +12,4 @@ support@2captcha.com
12
12
  """
13
13
 
14
14
  __author__ = '2captcha'
15
- __version__ = '1.2.7'
15
+ __version__ = '1.2.8'
@@ -1,8 +0,0 @@
1
- twocaptcha/__init__.py,sha256=J9BVnccLQS0Mq3s4Pt4fZXlT4tQhrV8BOOYTiC7Rn8k,473
2
- twocaptcha/api.py,sha256=qgv1y4FpajF2QZZ_Nzd4_Dcm7Dhk4I1LMAGubydg8zA,2763
3
- twocaptcha/solver.py,sha256=fenw4L5s-VGZMfBp5fNdv6F-mf1dEwBUfFo41SpcfUM,40918
4
- 2captcha_python-1.2.7.dist-info/LICENSE,sha256=sbILKjQcxUC6dAvBbivnRX9YCshBI9XRvvk1LGkpMEo,1065
5
- 2captcha_python-1.2.7.dist-info/METADATA,sha256=--t8t6fOdP-ic4btM1v7RgzcjWtbx3gMsRaoaVFXcMo,19512
6
- 2captcha_python-1.2.7.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
7
- 2captcha_python-1.2.7.dist-info/top_level.txt,sha256=AvFZdM89oM6Vo97ZTxT9AxHWpwoO3_Qf5ORMV3NClFE,11
8
- 2captcha_python-1.2.7.dist-info/RECORD,,