2captcha-python 1.2.3__py3-none-any.whl → 1.2.4__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,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: 2captcha-python
3
- Version: 1.2.3
3
+ Version: 1.2.4
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
@@ -14,7 +14,7 @@ License-File: LICENSE
14
14
  Requires-Dist: requests
15
15
 
16
16
  # Python Module for 2Captcha API
17
- The easiest way to quickly integrate [2Captcha] captcha solving service into your code to automate solving of any types of captcha.
17
+ The easiest way to quickly integrate the 2Captcha captcha-solving service into your code and automate the solving of any type of captcha.
18
18
 
19
19
  - [Python Module for 2Captcha API](#python-module-for-2captcha-api)
20
20
  - [Installation](#installation)
@@ -25,8 +25,8 @@ The easiest way to quickly integrate [2Captcha] captcha solving service into you
25
25
  - [Normal Captcha](#normal-captcha)
26
26
  - [Audio Captcha](#audio-captcha)
27
27
  - [Text Captcha](#text-captcha)
28
- - [ReCaptcha v2](#recaptcha-v2)
29
- - [ReCaptcha v3](#recaptcha-v3)
28
+ - [reCAPTCHA v2](#recaptcha-v2)
29
+ - [reCAPTCHA v3](#recaptcha-v3)
30
30
  - [FunCaptcha](#funcaptcha)
31
31
  - [GeeTest](#geetest)
32
32
  - [hCaptcha](#hcaptcha)
@@ -35,13 +35,14 @@ The easiest way to quickly integrate [2Captcha] captcha solving service into you
35
35
  - [Cloudflare Turnstile](#cloudflare-turnstile)
36
36
  - [Amazon WAF](#amazon-waf)
37
37
  - [KeyCaptcha](#keycaptcha)
38
+ - [atbCAPTCHA](#atbcaptcha)
38
39
  - [Capy](#capy)
39
40
  - [Grid](#grid)
40
41
  - [Canvas](#canvas)
41
42
  - [ClickCaptcha](#clickcaptcha)
42
43
  - [Rotate](#rotate)
43
44
  - [MTCaptcha](#mtcaptcha)
44
- - [Friendly Captcha](#friendly_captcha)
45
+ - [Friendly Captcha](#friendly-captcha)
45
46
  - [Cutcaptcha](#cutcaptcha)
46
47
  - [Other methods](#other-methods)
47
48
  - [send / getResult](#send--getresult)
@@ -67,7 +68,7 @@ from twocaptcha import TwoCaptcha
67
68
 
68
69
  solver = TwoCaptcha('YOUR_API_KEY')
69
70
  ```
70
- Also there are few options that can be configured:
71
+ Also there are a few options that can be configured:
71
72
 
72
73
  ```python
73
74
  config = {
@@ -89,8 +90,8 @@ solver = TwoCaptcha(**config)
89
90
  | server | `2captcha.com` | API server. You can set it to `rucaptcha.com` if your account is registered there |
90
91
  | softId | - | your software ID obtained after publishing in [2captcha sofware catalog] |
91
92
  | callback | - | URL of your web-sever that receives the captcha recognition result. The URl should be first registered in [pingback settings] of your account |
92
- | defaultTimeout | 120 | Polling timeout in seconds for all captcha types except ReCaptcha. Defines how long the module tries to get the answer from `res.php` API endpoint |
93
- | recaptchaTimeout | 600 | Polling timeout for ReCaptcha in seconds. Defines how long the module tries to get the answer from `res.php` API endpoint |
93
+ | defaultTimeout | 120 | Polling timeout in seconds for all captcha types except reCAPTCHA. Defines how long the module tries to get the answer from `res.php` API endpoint |
94
+ | recaptchaTimeout | 600 | Polling timeout for reCAPTCHA in seconds. Defines how long the module tries to get the answer from `res.php` API endpoint |
94
95
  | pollingInterval | 10 | Interval in seconds between requests to `res.php` API endpoint, setting values less than 5 seconds is not recommended |
95
96
 
96
97
  > **IMPORTANT:** once `callback` is defined for `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.
@@ -115,7 +116,7 @@ When you submit any image-based captcha use can provide additional options to he
115
116
  Below you can find basic examples for every captcha type. Check out [examples directory] to find more examples with all available options.
116
117
 
117
118
  ### Normal Captcha
118
- To bypass a normal captcha (distorted text on image) use the following method. This method also can be used to recognize any text on the image.
119
+ To bypass a normal captcha (distorted text on an image) use the following method. This method also can be used to recognize any text on the image.
119
120
  ```python
120
121
  result = solver.normal('path/to/captcha.jpg', param1=..., ...)
121
122
  # OR
@@ -124,7 +125,7 @@ result = solver.normal('https://site-with-captcha.com/path/to/captcha.jpg', para
124
125
 
125
126
  ### Audio Captcha
126
127
  To bypass an audio captcha (mp3 formats only) use the following method.
127
- You must provife the language as `lang = 'en'`. Supported languages are "en", "ru", "de", "el", "pt".
128
+ You must provide the language as `lang = 'en'`. Supported languages are "en", "ru", "de", "el", "pt".
128
129
 
129
130
  ```python
130
131
  result = solver.audio('path/to/captcha.mp3', lang = 'lang', param1=..., ...)
@@ -133,21 +134,21 @@ result = solver.audio('https://site-with-captcha.com/path/to/captcha.mp3', lang
133
134
  ```
134
135
 
135
136
  ### Text Captcha
136
- This method can be used to bypass a captcha that requires to answer a question provided in clear text.
137
+ This method can be used to bypass a captcha that requires answering a question provided in clear text.
137
138
  ```python
138
139
  result = solver.text('If tomorrow is Saturday, what day is today?', param1=..., ...)
139
140
  ```
140
141
 
141
- ### ReCaptcha v2
142
- Use this method to solve ReCaptcha V2 and obtain a token to bypass the protection.
142
+ ### reCAPTCHA v2
143
+ Use this method to solve reCAPTCHA V2 and obtain a token to bypass the protection.
143
144
  ```python
144
145
  result = solver.recaptcha(sitekey='6Le-wvkSVVABCPBMRTvw0Q4Muexq1bi0DJwx_mJ-',
145
146
  url='https://mysite.com/page/with/recaptcha',
146
147
  param1=..., ...)
147
148
  ```
148
149
 
149
- ### ReCaptcha v3
150
- This method provides ReCaptcha V3 solver and returns a token.
150
+ ### reCAPTCHA v3
151
+ This method provides a reCAPTCHA V3 solver and returns a token.
151
152
  ```python
152
153
  result = solver.recaptcha(sitekey='6Le-wvkSVVABCPBMRTvw0Q4Muexq1bi0DJwx_mJ-',
153
154
  url='https://mysite.com/page/with/recaptcha',
@@ -177,7 +178,7 @@ result = solver.geetest(gt='f1ab2cdefa3456789012345b6c78d90e',
177
178
 
178
179
 
179
180
  ### hCaptcha
180
- Use this method to solve hCaptcha challenge. Returns a token to bypass captcha.
181
+ Use this method to solve the hCaptcha challenge. Returns a token to bypass the captcha.
181
182
  ```python
182
183
  result = solver.hcaptcha(sitekey='10000000-ffff-ffff-ffff-000000000001',
183
184
  url='https://www.site.com/page/',
@@ -196,7 +197,7 @@ result = solver.geetest_v4(captcha_id='e392e1d7fd421dc63325744d5a2b9c73',
196
197
 
197
198
 
198
199
  ### Lemin Cropped Captcha
199
- Use this method to solve hCaptcha challenge. Returns JSON with answer containing the following values: answer, challenge_id.
200
+ Use this method to solve hCaptcha challenge. Returns JSON with an answer containing the following values: answer, challenge_id.
200
201
  ```python
201
202
  result = solver.lemin(captcha_id='CROPPED_1abcd2f_a1234b567c890d12ef3a456bc78d901d',
202
203
  div_id='lemin-cropped-captcha',
@@ -241,6 +242,18 @@ result = solver.keycaptcha(s_s_c_user_id=10,
241
242
 
242
243
  ```
243
244
 
245
+
246
+ ### atbCAPTCHA
247
+ Use this method to solve atbCaptcha challenge. Returns a token to bypass the captcha.
248
+ ```python
249
+ result = solver.atb_captcha(app_id='af25e409b33d722a95e56a230ff8771c',
250
+ api_server='https://cap.aisecurius.com',
251
+ url='http://mysite.com/',
252
+ param1=..., ...)
253
+
254
+ ```
255
+
256
+
244
257
  ### Capy
245
258
  Token-based method to bypass Capy puzzle captcha.
246
259
  ```python
@@ -250,17 +263,19 @@ result = solver.capy(sitekey='PUZZLE_Abc1dEFghIJKLM2no34P56q7rStu8v',
250
263
  param1=..., ...)
251
264
  ```
252
265
  ### Grid
253
- Grid method is originally called Old ReCaptcha V2 method. The method can be used to bypass any type of captcha where you can apply a grid on image and need to click specific grid boxes. Returns numbers of boxes.
266
+ Grid method was originally called the Old reCAPTCHA V2 method. The method can be used to bypass any type of captcha where you can apply a grid on an image and click specific grid boxes. Returns numbers of boxes.
254
267
  ```python
255
268
  result = solver.grid('path/to/captcha.jpg', param1=..., ...)
256
269
  ```
270
+
257
271
  ### Canvas
258
- Canvas method can be used when you need to draw a line around an object on image. Returns a set of points' coordinates to draw a polygon.
272
+ Canvas method can be used when you need to draw a line around an object on an image. Returns a set of points' coordinates to draw a polygon.
259
273
  ```python
260
274
  result = solver.canvas('path/to/captcha.jpg', param1=..., ...)
261
275
  ```
276
+
262
277
  ### ClickCaptcha
263
- ClickCaptcha method returns coordinates of points on captcha image. Can be used if you need to click on particular points on the image.
278
+ ClickCaptcha method returns coordinates of points on the captcha image. Can be used if you need to click on particular points in the image.
264
279
  ```python
265
280
  result = solver.coordinates('path/to/captcha.jpg', param1=..., ...)
266
281
  ```
@@ -319,7 +334,7 @@ balance = solver.balance()
319
334
  ```
320
335
 
321
336
  ### report
322
- Use this method to report good or bad captcha answer.
337
+ Use this method to report good or bad captcha answers.
323
338
  ```python
324
339
  solver.report(id, True) # captcha solved correctly
325
340
  solver.report(id, False) # captcha solved incorrectly
@@ -0,0 +1,8 @@
1
+ twocaptcha/__init__.py,sha256=u8iK7KTxp_KVqc047TyqmCIR3rvccPAaPELQLuXdBBg,193
2
+ twocaptcha/api.py,sha256=qgv1y4FpajF2QZZ_Nzd4_Dcm7Dhk4I1LMAGubydg8zA,2763
3
+ twocaptcha/solver.py,sha256=BHkSnNkgdPEhJoXhqQfXkKWXIY839oxBuiDdqmrhw6g,20111
4
+ 2captcha_python-1.2.4.dist-info/LICENSE,sha256=sbILKjQcxUC6dAvBbivnRX9YCshBI9XRvvk1LGkpMEo,1065
5
+ 2captcha_python-1.2.4.dist-info/METADATA,sha256=RUptBTQLejnknesYfkqXcZ6ZhHfoY7WmhuHQJGgSflo,15853
6
+ 2captcha_python-1.2.4.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
7
+ 2captcha_python-1.2.4.dist-info/top_level.txt,sha256=AvFZdM89oM6Vo97ZTxT9AxHWpwoO3_Qf5ORMV3NClFE,11
8
+ 2captcha_python-1.2.4.dist-info/RECORD,,
twocaptcha/__init__.py CHANGED
@@ -2,4 +2,4 @@ from .api import ApiClient
2
2
  from .solver import (TwoCaptcha, SolverExceptions, ValidationException,
3
3
  NetworkException, ApiException, TimeoutException)
4
4
 
5
- __version__ = '1.2.3'
5
+ __version__ = '1.2.4'
twocaptcha/solver.py CHANGED
@@ -36,7 +36,7 @@ class TimeoutException(SolverExceptions):
36
36
  class TwoCaptcha():
37
37
  def __init__(self,
38
38
  apiKey,
39
- softId=None,
39
+ softId=4580,
40
40
  callback=None,
41
41
  defaultTimeout=120,
42
42
  recaptchaTimeout=600,
@@ -457,6 +457,26 @@ class TwoCaptcha():
457
457
  method='lemin',
458
458
  **kwargs)
459
459
  return result
460
+
461
+ def atb_captcha(self, app_id, api_server, url, **kwargs):
462
+ '''
463
+ Wrapper for solving atbCAPTCHA
464
+
465
+ Required:
466
+ app_id
467
+ api_server
468
+ url
469
+
470
+ Optional params:
471
+
472
+
473
+ '''
474
+ result = self.solve(app_id=app_id,
475
+ api_server=api_server,
476
+ url=url,
477
+ method='atb_captcha',
478
+ **kwargs)
479
+ return result
460
480
 
461
481
 
462
482
  def turnstile(self, sitekey, url, **kwargs):
@@ -1,8 +0,0 @@
1
- twocaptcha/__init__.py,sha256=5A1YhRuG_zytoi01RcsxoW87Ix_ee5zN5VYap-lJsb0,193
2
- twocaptcha/api.py,sha256=qgv1y4FpajF2QZZ_Nzd4_Dcm7Dhk4I1LMAGubydg8zA,2763
3
- twocaptcha/solver.py,sha256=gqReuWENkHC1Ao4ykWfRjrtjjY_7zeBvffjPHGlOLPg,19639
4
- 2captcha_python-1.2.3.dist-info/LICENSE,sha256=sbILKjQcxUC6dAvBbivnRX9YCshBI9XRvvk1LGkpMEo,1065
5
- 2captcha_python-1.2.3.dist-info/METADATA,sha256=7jmH9xEhmIX0qfxe3U_Vpd7BPkrG7f3OTE8OW34goN4,15429
6
- 2captcha_python-1.2.3.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
7
- 2captcha_python-1.2.3.dist-info/top_level.txt,sha256=AvFZdM89oM6Vo97ZTxT9AxHWpwoO3_Qf5ORMV3NClFE,11
8
- 2captcha_python-1.2.3.dist-info/RECORD,,