2captcha-python 1.2.4__tar.gz → 1.2.5__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.4 → 2captcha_python-1.2.5}/2captcha_python.egg-info/PKG-INFO +21 -14
  2. {2captcha-python-1.2.4 → 2captcha_python-1.2.5}/2captcha_python.egg-info/SOURCES.txt +1 -0
  3. {2captcha-python-1.2.4 → 2captcha_python-1.2.5}/PKG-INFO +21 -14
  4. {2captcha-python-1.2.4 → 2captcha_python-1.2.5}/README.md +20 -13
  5. 2captcha_python-1.2.5/tests/test_tencent.py +29 -0
  6. 2captcha_python-1.2.5/twocaptcha/__init__.py +15 -0
  7. 2captcha_python-1.2.5/twocaptcha/solver.py +1040 -0
  8. 2captcha-python-1.2.4/twocaptcha/__init__.py +0 -5
  9. 2captcha-python-1.2.4/twocaptcha/solver.py +0 -802
  10. {2captcha-python-1.2.4 → 2captcha_python-1.2.5}/2captcha_python.egg-info/dependency_links.txt +0 -0
  11. {2captcha-python-1.2.4 → 2captcha_python-1.2.5}/2captcha_python.egg-info/requires.txt +0 -0
  12. {2captcha-python-1.2.4 → 2captcha_python-1.2.5}/2captcha_python.egg-info/top_level.txt +0 -0
  13. {2captcha-python-1.2.4 → 2captcha_python-1.2.5}/LICENSE +0 -0
  14. {2captcha-python-1.2.4 → 2captcha_python-1.2.5}/setup.cfg +0 -0
  15. {2captcha-python-1.2.4 → 2captcha_python-1.2.5}/setup.py +0 -0
  16. {2captcha-python-1.2.4 → 2captcha_python-1.2.5}/tests/test_amazon_waf.py +0 -0
  17. {2captcha-python-1.2.4 → 2captcha_python-1.2.5}/tests/test_atb_captcha.py +0 -0
  18. {2captcha-python-1.2.4 → 2captcha_python-1.2.5}/tests/test_canvas.py +0 -0
  19. {2captcha-python-1.2.4 → 2captcha_python-1.2.5}/tests/test_capy.py +0 -0
  20. {2captcha-python-1.2.4 → 2captcha_python-1.2.5}/tests/test_coordinates.py +0 -0
  21. {2captcha-python-1.2.4 → 2captcha_python-1.2.5}/tests/test_cutcaptcha.py +0 -0
  22. {2captcha-python-1.2.4 → 2captcha_python-1.2.5}/tests/test_friendly_captcha.py +0 -0
  23. {2captcha-python-1.2.4 → 2captcha_python-1.2.5}/tests/test_funcaptcha.py +0 -0
  24. {2captcha-python-1.2.4 → 2captcha_python-1.2.5}/tests/test_geetest.py +0 -0
  25. {2captcha-python-1.2.4 → 2captcha_python-1.2.5}/tests/test_geetest_v4.py +0 -0
  26. {2captcha-python-1.2.4 → 2captcha_python-1.2.5}/tests/test_grid.py +0 -0
  27. {2captcha-python-1.2.4 → 2captcha_python-1.2.5}/tests/test_hcaptcha.py +0 -0
  28. {2captcha-python-1.2.4 → 2captcha_python-1.2.5}/tests/test_keycaptcha.py +0 -0
  29. {2captcha-python-1.2.4 → 2captcha_python-1.2.5}/tests/test_lemin.py +0 -0
  30. {2captcha-python-1.2.4 → 2captcha_python-1.2.5}/tests/test_mtcaptcha.py +0 -0
  31. {2captcha-python-1.2.4 → 2captcha_python-1.2.5}/tests/test_normal.py +0 -0
  32. {2captcha-python-1.2.4 → 2captcha_python-1.2.5}/tests/test_recaptcha.py +0 -0
  33. {2captcha-python-1.2.4 → 2captcha_python-1.2.5}/tests/test_rotate.py +0 -0
  34. {2captcha-python-1.2.4 → 2captcha_python-1.2.5}/tests/test_text.py +0 -0
  35. {2captcha-python-1.2.4 → 2captcha_python-1.2.5}/tests/test_turnstile.py +0 -0
  36. {2captcha-python-1.2.4 → 2captcha_python-1.2.5}/twocaptcha/api.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: 2captcha-python
3
- Version: 1.2.4
3
+ Version: 1.2.5
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
@@ -45,7 +45,7 @@ The easiest way to quickly integrate the 2Captcha captcha-solving service into y
45
45
  - [Friendly Captcha](#friendly-captcha)
46
46
  - [Cutcaptcha](#cutcaptcha)
47
47
  - [Other methods](#other-methods)
48
- - [send / getResult](#send--getresult)
48
+ - [send / get_result](#send--getresult)
49
49
  - [balance](#balance)
50
50
  - [report](#report)
51
51
  - [Error handling](#error-handling)
@@ -95,7 +95,7 @@ solver = TwoCaptcha(**config)
95
95
  | pollingInterval | 10 | Interval in seconds between requests to `res.php` API endpoint, setting values less than 5 seconds is not recommended |
96
96
 
97
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.
98
- To get the answer manually use [getResult method](#send--getresult)
98
+ To get the answer manually use [get_result method](#send--getresult)
99
99
 
100
100
  ## Solve captcha
101
101
  When you submit any image-based captcha use can provide additional options to help 2captcha workers to solve it properly.
@@ -177,20 +177,21 @@ result = solver.geetest(gt='f1ab2cdefa3456789012345b6c78d90e',
177
177
  ```
178
178
 
179
179
 
180
- ### hCaptcha
181
- Use this method to solve the hCaptcha challenge. Returns a token to bypass the captcha.
180
+ ### GeeTest v4
181
+ Use this method to solve GeeTest v4. Returns the response in JSON.
182
182
  ```python
183
- result = solver.hcaptcha(sitekey='10000000-ffff-ffff-ffff-000000000001',
184
- url='https://www.site.com/page/',
183
+ result = solver.geetest_v4(captcha_id='e392e1d7fd421dc63325744d5a2b9c73',
184
+ url='https://www.site.com/page/',
185
185
  param1=..., ...)
186
186
 
187
187
  ```
188
188
 
189
- ### GeeTest v4
190
- Use this method to solve GeeTest v4. Returns the response in JSON.
189
+
190
+ ### hCaptcha
191
+ Use this method to solve the hCaptcha challenge. Returns a token to bypass the captcha.
191
192
  ```python
192
- result = solver.geetest_v4(captcha_id='e392e1d7fd421dc63325744d5a2b9c73',
193
- url='https://www.site.com/page/',
193
+ result = solver.hcaptcha(sitekey='10000000-ffff-ffff-ffff-000000000001',
194
+ url='https://www.site.com/page/',
194
195
  param1=..., ...)
195
196
 
196
197
  ```
@@ -314,7 +315,7 @@ result = solver.cutcaptcha(misery_key='ad52c87af17e2ec09b8d918c9f00416b1cb8c320'
314
315
 
315
316
  ## Other methods
316
317
 
317
- ### send / getResult
318
+ ### send / get_result
318
319
  These methods can be used for manual captcha submission and answer polling.
319
320
  ```python
320
321
  import time
@@ -362,7 +363,11 @@ except TimeoutException as e:
362
363
 
363
364
  ### Proxies
364
365
 
365
- You can pass your proxy as an additional argument for methods: recaptcha, funcaptcha and geetest. The proxy will be forwarded to the API to solve the captcha.
366
+ You can pass your proxy as an additional argument for methods: recaptcha, funcaptcha, geetest, geetest v4, hcaptcha,
367
+ keycaptcha, capy pazzle, grid, rotate, lemin, atbcaptcha, turnstile, amazon waf, mtcaptcha, friendly captcha, cutcaptcha.
368
+ The proxy will be forwarded to the API to solve the captcha.
369
+
370
+ We have our own proxies that we can offer you. [Buy residential proxies] for avoid restrictions and blocks. [Quick start].
366
371
 
367
372
  ```python
368
373
  proxy={
@@ -392,7 +397,9 @@ async def captchaSolver(image):
392
397
  [2Captcha]: https://2captcha.com/
393
398
  [2captcha sofware catalog]: https://2captcha.com/software
394
399
  [pingback settings]: https://2captcha.com/setting/pingback
395
- [post options]: https://2captcha.com/2captcha-api#normal_post
400
+ [post options]: https://2captcha.com/2captcha-api#solving_normal_captcha
396
401
  [list of supported languages]: https://2captcha.com/2captcha-api#language
397
402
  [examples directory]: /examples
398
403
  [asyncio]: https://docs.python.org/3/library/asyncio.html
404
+ [Buy residential proxies]: https://2captcha.com/proxy/residential-proxies
405
+ [Quick start]: https://2captcha.com/proxy?openAddTrafficModal=true
@@ -24,6 +24,7 @@ tests/test_mtcaptcha.py
24
24
  tests/test_normal.py
25
25
  tests/test_recaptcha.py
26
26
  tests/test_rotate.py
27
+ tests/test_tencent.py
27
28
  tests/test_text.py
28
29
  tests/test_turnstile.py
29
30
  twocaptcha/__init__.py
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: 2captcha-python
3
- Version: 1.2.4
3
+ Version: 1.2.5
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
@@ -45,7 +45,7 @@ The easiest way to quickly integrate the 2Captcha captcha-solving service into y
45
45
  - [Friendly Captcha](#friendly-captcha)
46
46
  - [Cutcaptcha](#cutcaptcha)
47
47
  - [Other methods](#other-methods)
48
- - [send / getResult](#send--getresult)
48
+ - [send / get_result](#send--getresult)
49
49
  - [balance](#balance)
50
50
  - [report](#report)
51
51
  - [Error handling](#error-handling)
@@ -95,7 +95,7 @@ solver = TwoCaptcha(**config)
95
95
  | pollingInterval | 10 | Interval in seconds between requests to `res.php` API endpoint, setting values less than 5 seconds is not recommended |
96
96
 
97
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.
98
- To get the answer manually use [getResult method](#send--getresult)
98
+ To get the answer manually use [get_result method](#send--getresult)
99
99
 
100
100
  ## Solve captcha
101
101
  When you submit any image-based captcha use can provide additional options to help 2captcha workers to solve it properly.
@@ -177,20 +177,21 @@ result = solver.geetest(gt='f1ab2cdefa3456789012345b6c78d90e',
177
177
  ```
178
178
 
179
179
 
180
- ### hCaptcha
181
- Use this method to solve the hCaptcha challenge. Returns a token to bypass the captcha.
180
+ ### GeeTest v4
181
+ Use this method to solve GeeTest v4. Returns the response in JSON.
182
182
  ```python
183
- result = solver.hcaptcha(sitekey='10000000-ffff-ffff-ffff-000000000001',
184
- url='https://www.site.com/page/',
183
+ result = solver.geetest_v4(captcha_id='e392e1d7fd421dc63325744d5a2b9c73',
184
+ url='https://www.site.com/page/',
185
185
  param1=..., ...)
186
186
 
187
187
  ```
188
188
 
189
- ### GeeTest v4
190
- Use this method to solve GeeTest v4. Returns the response in JSON.
189
+
190
+ ### hCaptcha
191
+ Use this method to solve the hCaptcha challenge. Returns a token to bypass the captcha.
191
192
  ```python
192
- result = solver.geetest_v4(captcha_id='e392e1d7fd421dc63325744d5a2b9c73',
193
- url='https://www.site.com/page/',
193
+ result = solver.hcaptcha(sitekey='10000000-ffff-ffff-ffff-000000000001',
194
+ url='https://www.site.com/page/',
194
195
  param1=..., ...)
195
196
 
196
197
  ```
@@ -314,7 +315,7 @@ result = solver.cutcaptcha(misery_key='ad52c87af17e2ec09b8d918c9f00416b1cb8c320'
314
315
 
315
316
  ## Other methods
316
317
 
317
- ### send / getResult
318
+ ### send / get_result
318
319
  These methods can be used for manual captcha submission and answer polling.
319
320
  ```python
320
321
  import time
@@ -362,7 +363,11 @@ except TimeoutException as e:
362
363
 
363
364
  ### Proxies
364
365
 
365
- You can pass your proxy as an additional argument for methods: recaptcha, funcaptcha and geetest. The proxy will be forwarded to the API to solve the captcha.
366
+ You can pass your proxy as an additional argument for methods: recaptcha, funcaptcha, geetest, geetest v4, hcaptcha,
367
+ keycaptcha, capy pazzle, grid, rotate, lemin, atbcaptcha, turnstile, amazon waf, mtcaptcha, friendly captcha, cutcaptcha.
368
+ The proxy will be forwarded to the API to solve the captcha.
369
+
370
+ We have our own proxies that we can offer you. [Buy residential proxies] for avoid restrictions and blocks. [Quick start].
366
371
 
367
372
  ```python
368
373
  proxy={
@@ -392,7 +397,9 @@ async def captchaSolver(image):
392
397
  [2Captcha]: https://2captcha.com/
393
398
  [2captcha sofware catalog]: https://2captcha.com/software
394
399
  [pingback settings]: https://2captcha.com/setting/pingback
395
- [post options]: https://2captcha.com/2captcha-api#normal_post
400
+ [post options]: https://2captcha.com/2captcha-api#solving_normal_captcha
396
401
  [list of supported languages]: https://2captcha.com/2captcha-api#language
397
402
  [examples directory]: /examples
398
403
  [asyncio]: https://docs.python.org/3/library/asyncio.html
404
+ [Buy residential proxies]: https://2captcha.com/proxy/residential-proxies
405
+ [Quick start]: https://2captcha.com/proxy?openAddTrafficModal=true
@@ -30,7 +30,7 @@ The easiest way to quickly integrate the 2Captcha captcha-solving service into y
30
30
  - [Friendly Captcha](#friendly-captcha)
31
31
  - [Cutcaptcha](#cutcaptcha)
32
32
  - [Other methods](#other-methods)
33
- - [send / getResult](#send--getresult)
33
+ - [send / get_result](#send--getresult)
34
34
  - [balance](#balance)
35
35
  - [report](#report)
36
36
  - [Error handling](#error-handling)
@@ -80,7 +80,7 @@ solver = TwoCaptcha(**config)
80
80
  | pollingInterval | 10 | Interval in seconds between requests to `res.php` API endpoint, setting values less than 5 seconds is not recommended |
81
81
 
82
82
  > **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.
83
- To get the answer manually use [getResult method](#send--getresult)
83
+ To get the answer manually use [get_result method](#send--getresult)
84
84
 
85
85
  ## Solve captcha
86
86
  When you submit any image-based captcha use can provide additional options to help 2captcha workers to solve it properly.
@@ -162,20 +162,21 @@ result = solver.geetest(gt='f1ab2cdefa3456789012345b6c78d90e',
162
162
  ```
163
163
 
164
164
 
165
- ### hCaptcha
166
- Use this method to solve the hCaptcha challenge. Returns a token to bypass the captcha.
165
+ ### GeeTest v4
166
+ Use this method to solve GeeTest v4. Returns the response in JSON.
167
167
  ```python
168
- result = solver.hcaptcha(sitekey='10000000-ffff-ffff-ffff-000000000001',
169
- url='https://www.site.com/page/',
168
+ result = solver.geetest_v4(captcha_id='e392e1d7fd421dc63325744d5a2b9c73',
169
+ url='https://www.site.com/page/',
170
170
  param1=..., ...)
171
171
 
172
172
  ```
173
173
 
174
- ### GeeTest v4
175
- Use this method to solve GeeTest v4. Returns the response in JSON.
174
+
175
+ ### hCaptcha
176
+ Use this method to solve the hCaptcha challenge. Returns a token to bypass the captcha.
176
177
  ```python
177
- result = solver.geetest_v4(captcha_id='e392e1d7fd421dc63325744d5a2b9c73',
178
- url='https://www.site.com/page/',
178
+ result = solver.hcaptcha(sitekey='10000000-ffff-ffff-ffff-000000000001',
179
+ url='https://www.site.com/page/',
179
180
  param1=..., ...)
180
181
 
181
182
  ```
@@ -299,7 +300,7 @@ result = solver.cutcaptcha(misery_key='ad52c87af17e2ec09b8d918c9f00416b1cb8c320'
299
300
 
300
301
  ## Other methods
301
302
 
302
- ### send / getResult
303
+ ### send / get_result
303
304
  These methods can be used for manual captcha submission and answer polling.
304
305
  ```python
305
306
  import time
@@ -347,7 +348,11 @@ except TimeoutException as e:
347
348
 
348
349
  ### Proxies
349
350
 
350
- You can pass your proxy as an additional argument for methods: recaptcha, funcaptcha and geetest. The proxy will be forwarded to the API to solve the captcha.
351
+ You can pass your proxy as an additional argument for methods: recaptcha, funcaptcha, geetest, geetest v4, hcaptcha,
352
+ keycaptcha, capy pazzle, grid, rotate, lemin, atbcaptcha, turnstile, amazon waf, mtcaptcha, friendly captcha, cutcaptcha.
353
+ The proxy will be forwarded to the API to solve the captcha.
354
+
355
+ We have our own proxies that we can offer you. [Buy residential proxies] for avoid restrictions and blocks. [Quick start].
351
356
 
352
357
  ```python
353
358
  proxy={
@@ -377,7 +382,9 @@ async def captchaSolver(image):
377
382
  [2Captcha]: https://2captcha.com/
378
383
  [2captcha sofware catalog]: https://2captcha.com/software
379
384
  [pingback settings]: https://2captcha.com/setting/pingback
380
- [post options]: https://2captcha.com/2captcha-api#normal_post
385
+ [post options]: https://2captcha.com/2captcha-api#solving_normal_captcha
381
386
  [list of supported languages]: https://2captcha.com/2captcha-api#language
382
387
  [examples directory]: /examples
383
388
  [asyncio]: https://docs.python.org/3/library/asyncio.html
389
+ [Buy residential proxies]: https://2captcha.com/proxy/residential-proxies
390
+ [Quick start]: https://2captcha.com/proxy?openAddTrafficModal=true
@@ -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 TencentTest(AbstractTest):
12
+
13
+ def test_all_params(self):
14
+ params = {
15
+ "app_id": "197322596",
16
+ "url": "https://www.holla.world/random-video-chat#app"
17
+ }
18
+
19
+ sends = {
20
+ "method": "tencent",
21
+ "app_id": "197322596",
22
+ "pageurl": "https://www.holla.world/random-video-chat#app",
23
+ }
24
+
25
+ return self.send_return(sends, self.solver.tencent, **params)
26
+
27
+
28
+ if __name__ == '__main__':
29
+ unittest.main()
@@ -0,0 +1,15 @@
1
+ from .api import ApiClient
2
+ from .solver import (TwoCaptcha, SolverExceptions, ValidationException,
3
+ NetworkException, ApiException, TimeoutException)
4
+
5
+ """
6
+ Python 3 package for easy integration with the API of 2captcha captcha solving service to bypass recaptcha, hcaptcha,
7
+ funcaptcha, geetest and solve any other captchas.
8
+
9
+ website 2captcha [https://2captcha.com/]
10
+ support@2captcha.com
11
+ # License: MIT
12
+ """
13
+
14
+ __author__ = '2captcha'
15
+ __version__ = '1.2.5'