2captcha-python 1.2.2__tar.gz → 1.2.3__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.2 → 2captcha-python-1.2.3}/2captcha_python.egg-info/PKG-INFO +30 -1
- {2captcha-python-1.2.2 → 2captcha-python-1.2.3}/2captcha_python.egg-info/SOURCES.txt +3 -0
- {2captcha-python-1.2.2 → 2captcha-python-1.2.3}/PKG-INFO +30 -1
- {2captcha-python-1.2.2 → 2captcha-python-1.2.3}/README.md +29 -0
- 2captcha-python-1.2.3/tests/test_cutcaptcha.py +31 -0
- 2captcha-python-1.2.3/tests/test_friendly_captcha.py +29 -0
- 2captcha-python-1.2.3/tests/test_mtcaptcha.py +29 -0
- {2captcha-python-1.2.2 → 2captcha-python-1.2.3}/twocaptcha/__init__.py +1 -1
- {2captcha-python-1.2.2 → 2captcha-python-1.2.3}/twocaptcha/solver.py +60 -0
- {2captcha-python-1.2.2 → 2captcha-python-1.2.3}/2captcha_python.egg-info/dependency_links.txt +0 -0
- {2captcha-python-1.2.2 → 2captcha-python-1.2.3}/2captcha_python.egg-info/requires.txt +0 -0
- {2captcha-python-1.2.2 → 2captcha-python-1.2.3}/2captcha_python.egg-info/top_level.txt +0 -0
- {2captcha-python-1.2.2 → 2captcha-python-1.2.3}/LICENSE +0 -0
- {2captcha-python-1.2.2 → 2captcha-python-1.2.3}/setup.cfg +0 -0
- {2captcha-python-1.2.2 → 2captcha-python-1.2.3}/setup.py +0 -0
- {2captcha-python-1.2.2 → 2captcha-python-1.2.3}/tests/test_amazon_waf.py +0 -0
- {2captcha-python-1.2.2 → 2captcha-python-1.2.3}/tests/test_canvas.py +0 -0
- {2captcha-python-1.2.2 → 2captcha-python-1.2.3}/tests/test_capy.py +0 -0
- {2captcha-python-1.2.2 → 2captcha-python-1.2.3}/tests/test_coordinates.py +0 -0
- {2captcha-python-1.2.2 → 2captcha-python-1.2.3}/tests/test_funcaptcha.py +0 -0
- {2captcha-python-1.2.2 → 2captcha-python-1.2.3}/tests/test_geetest.py +0 -0
- {2captcha-python-1.2.2 → 2captcha-python-1.2.3}/tests/test_geetest_v4.py +0 -0
- {2captcha-python-1.2.2 → 2captcha-python-1.2.3}/tests/test_grid.py +0 -0
- {2captcha-python-1.2.2 → 2captcha-python-1.2.3}/tests/test_hcaptcha.py +0 -0
- {2captcha-python-1.2.2 → 2captcha-python-1.2.3}/tests/test_keycaptcha.py +0 -0
- {2captcha-python-1.2.2 → 2captcha-python-1.2.3}/tests/test_lemin.py +0 -0
- {2captcha-python-1.2.2 → 2captcha-python-1.2.3}/tests/test_normal.py +0 -0
- {2captcha-python-1.2.2 → 2captcha-python-1.2.3}/tests/test_recaptcha.py +0 -0
- {2captcha-python-1.2.2 → 2captcha-python-1.2.3}/tests/test_rotate.py +0 -0
- {2captcha-python-1.2.2 → 2captcha-python-1.2.3}/tests/test_text.py +0 -0
- {2captcha-python-1.2.2 → 2captcha-python-1.2.3}/tests/test_turnstile.py +0 -0
- {2captcha-python-1.2.2 → 2captcha-python-1.2.3}/twocaptcha/api.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: 2captcha-python
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.3
|
|
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
|
|
@@ -40,6 +40,9 @@ The easiest way to quickly integrate [2Captcha] captcha solving service into you
|
|
|
40
40
|
- [Canvas](#canvas)
|
|
41
41
|
- [ClickCaptcha](#clickcaptcha)
|
|
42
42
|
- [Rotate](#rotate)
|
|
43
|
+
- [MTCaptcha](#mtcaptcha)
|
|
44
|
+
- [Friendly Captcha](#friendly_captcha)
|
|
45
|
+
- [Cutcaptcha](#cutcaptcha)
|
|
43
46
|
- [Other methods](#other-methods)
|
|
44
47
|
- [send / getResult](#send--getresult)
|
|
45
48
|
- [balance](#balance)
|
|
@@ -268,6 +271,32 @@ This method can be used to solve a captcha that asks to rotate an object. Mostly
|
|
|
268
271
|
result = solver.rotate('path/to/captcha.jpg', param1=..., ...)
|
|
269
272
|
```
|
|
270
273
|
|
|
274
|
+
### MTCaptcha
|
|
275
|
+
Use this method to solve MTCaptcha and obtain a token to bypass the protection.
|
|
276
|
+
```python
|
|
277
|
+
result = solver.mtcaptcha(sitekey='MTPublic-KzqLY1cKH',
|
|
278
|
+
url='https://2captcha.com/demo/mtcaptcha',
|
|
279
|
+
param1=..., ...)
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
### Friendly Captcha
|
|
283
|
+
Friendly Captcha solving method. Returns a token.
|
|
284
|
+
```python
|
|
285
|
+
result = solver.friendly_captcha(sitekey='FCMGEMUD2KTDSQ5H',
|
|
286
|
+
url='https://friendlycaptcha.com/demo',
|
|
287
|
+
param1=..., ...)
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
### Cutcaptcha
|
|
291
|
+
Use this method to solve Cutcaptcha. Returns the response in JSON.
|
|
292
|
+
```python
|
|
293
|
+
result = solver.cutcaptcha(misery_key='ad52c87af17e2ec09b8d918c9f00416b1cb8c320',
|
|
294
|
+
apikey='SAs61IAI',
|
|
295
|
+
url='https://mysite.com/page/with/cutcaptcha',
|
|
296
|
+
param1=..., ...)
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
|
|
271
300
|
## Other methods
|
|
272
301
|
|
|
273
302
|
### send / getResult
|
|
@@ -10,6 +10,8 @@ tests/test_amazon_waf.py
|
|
|
10
10
|
tests/test_canvas.py
|
|
11
11
|
tests/test_capy.py
|
|
12
12
|
tests/test_coordinates.py
|
|
13
|
+
tests/test_cutcaptcha.py
|
|
14
|
+
tests/test_friendly_captcha.py
|
|
13
15
|
tests/test_funcaptcha.py
|
|
14
16
|
tests/test_geetest.py
|
|
15
17
|
tests/test_geetest_v4.py
|
|
@@ -17,6 +19,7 @@ tests/test_grid.py
|
|
|
17
19
|
tests/test_hcaptcha.py
|
|
18
20
|
tests/test_keycaptcha.py
|
|
19
21
|
tests/test_lemin.py
|
|
22
|
+
tests/test_mtcaptcha.py
|
|
20
23
|
tests/test_normal.py
|
|
21
24
|
tests/test_recaptcha.py
|
|
22
25
|
tests/test_rotate.py
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: 2captcha-python
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.3
|
|
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
|
|
@@ -40,6 +40,9 @@ The easiest way to quickly integrate [2Captcha] captcha solving service into you
|
|
|
40
40
|
- [Canvas](#canvas)
|
|
41
41
|
- [ClickCaptcha](#clickcaptcha)
|
|
42
42
|
- [Rotate](#rotate)
|
|
43
|
+
- [MTCaptcha](#mtcaptcha)
|
|
44
|
+
- [Friendly Captcha](#friendly_captcha)
|
|
45
|
+
- [Cutcaptcha](#cutcaptcha)
|
|
43
46
|
- [Other methods](#other-methods)
|
|
44
47
|
- [send / getResult](#send--getresult)
|
|
45
48
|
- [balance](#balance)
|
|
@@ -268,6 +271,32 @@ This method can be used to solve a captcha that asks to rotate an object. Mostly
|
|
|
268
271
|
result = solver.rotate('path/to/captcha.jpg', param1=..., ...)
|
|
269
272
|
```
|
|
270
273
|
|
|
274
|
+
### MTCaptcha
|
|
275
|
+
Use this method to solve MTCaptcha and obtain a token to bypass the protection.
|
|
276
|
+
```python
|
|
277
|
+
result = solver.mtcaptcha(sitekey='MTPublic-KzqLY1cKH',
|
|
278
|
+
url='https://2captcha.com/demo/mtcaptcha',
|
|
279
|
+
param1=..., ...)
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
### Friendly Captcha
|
|
283
|
+
Friendly Captcha solving method. Returns a token.
|
|
284
|
+
```python
|
|
285
|
+
result = solver.friendly_captcha(sitekey='FCMGEMUD2KTDSQ5H',
|
|
286
|
+
url='https://friendlycaptcha.com/demo',
|
|
287
|
+
param1=..., ...)
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
### Cutcaptcha
|
|
291
|
+
Use this method to solve Cutcaptcha. Returns the response in JSON.
|
|
292
|
+
```python
|
|
293
|
+
result = solver.cutcaptcha(misery_key='ad52c87af17e2ec09b8d918c9f00416b1cb8c320',
|
|
294
|
+
apikey='SAs61IAI',
|
|
295
|
+
url='https://mysite.com/page/with/cutcaptcha',
|
|
296
|
+
param1=..., ...)
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
|
|
271
300
|
## Other methods
|
|
272
301
|
|
|
273
302
|
### send / getResult
|
|
@@ -25,6 +25,9 @@ The easiest way to quickly integrate [2Captcha] captcha solving service into you
|
|
|
25
25
|
- [Canvas](#canvas)
|
|
26
26
|
- [ClickCaptcha](#clickcaptcha)
|
|
27
27
|
- [Rotate](#rotate)
|
|
28
|
+
- [MTCaptcha](#mtcaptcha)
|
|
29
|
+
- [Friendly Captcha](#friendly_captcha)
|
|
30
|
+
- [Cutcaptcha](#cutcaptcha)
|
|
28
31
|
- [Other methods](#other-methods)
|
|
29
32
|
- [send / getResult](#send--getresult)
|
|
30
33
|
- [balance](#balance)
|
|
@@ -253,6 +256,32 @@ This method can be used to solve a captcha that asks to rotate an object. Mostly
|
|
|
253
256
|
result = solver.rotate('path/to/captcha.jpg', param1=..., ...)
|
|
254
257
|
```
|
|
255
258
|
|
|
259
|
+
### MTCaptcha
|
|
260
|
+
Use this method to solve MTCaptcha and obtain a token to bypass the protection.
|
|
261
|
+
```python
|
|
262
|
+
result = solver.mtcaptcha(sitekey='MTPublic-KzqLY1cKH',
|
|
263
|
+
url='https://2captcha.com/demo/mtcaptcha',
|
|
264
|
+
param1=..., ...)
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
### Friendly Captcha
|
|
268
|
+
Friendly Captcha solving method. Returns a token.
|
|
269
|
+
```python
|
|
270
|
+
result = solver.friendly_captcha(sitekey='FCMGEMUD2KTDSQ5H',
|
|
271
|
+
url='https://friendlycaptcha.com/demo',
|
|
272
|
+
param1=..., ...)
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
### Cutcaptcha
|
|
276
|
+
Use this method to solve Cutcaptcha. Returns the response in JSON.
|
|
277
|
+
```python
|
|
278
|
+
result = solver.cutcaptcha(misery_key='ad52c87af17e2ec09b8d918c9f00416b1cb8c320',
|
|
279
|
+
apikey='SAs61IAI',
|
|
280
|
+
url='https://mysite.com/page/with/cutcaptcha',
|
|
281
|
+
param1=..., ...)
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
|
|
256
285
|
## Other methods
|
|
257
286
|
|
|
258
287
|
### send / getResult
|
|
@@ -0,0 +1,31 @@
|
|
|
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 CutcaptchaTest(AbstractTest):
|
|
12
|
+
|
|
13
|
+
def test_all_params(self):
|
|
14
|
+
params = {
|
|
15
|
+
'misery_key': 'ad52c87af17e2ec09b8d918c9f00416b1cb8c320',
|
|
16
|
+
'apikey': 'SAs61IAI',
|
|
17
|
+
'url': 'https://www.site.com/page/',
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
sends = {
|
|
21
|
+
'method': 'cutcaptcha',
|
|
22
|
+
'api_key': 'SAs61IAI',
|
|
23
|
+
'misery_key': 'ad52c87af17e2ec09b8d918c9f00416b1cb8c320',
|
|
24
|
+
'pageurl': 'https://www.site.com/page/',
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
return self.send_return(sends, self.solver.cutcaptcha, **params)
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
if __name__ == '__main__':
|
|
31
|
+
unittest.main()
|
|
@@ -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 FriendlyCaptchaTest(AbstractTest):
|
|
12
|
+
|
|
13
|
+
def test_all_params(self):
|
|
14
|
+
params = {
|
|
15
|
+
'sitekey': 'FCMGEMUD2KTDSQ5H',
|
|
16
|
+
'url': 'https://friendlycaptcha.com/demo',
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
sends = {
|
|
20
|
+
'method': 'friendly_captcha',
|
|
21
|
+
'sitekey': 'FCMGEMUD2KTDSQ5H',
|
|
22
|
+
'pageurl': 'https://friendlycaptcha.com/demo',
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
return self.send_return(sends, self.solver.friendly_captcha, **params)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
if __name__ == '__main__':
|
|
29
|
+
unittest.main()
|
|
@@ -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 MTCaptchaTest(AbstractTest):
|
|
12
|
+
|
|
13
|
+
def test_all_params(self):
|
|
14
|
+
params = {
|
|
15
|
+
'sitekey': 'MTPublic-KzqLY1cKH',
|
|
16
|
+
'url': 'https://2captcha.com/demo/mtcaptcha',
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
sends = {
|
|
20
|
+
'method': 'mt_captcha',
|
|
21
|
+
'sitekey': 'MTPublic-KzqLY1cKH',
|
|
22
|
+
'pageurl': 'https://2captcha.com/demo/mtcaptcha',
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
return self.send_return(sends, self.solver.mtcaptcha, **params)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
if __name__ == '__main__':
|
|
29
|
+
unittest.main()
|
|
@@ -503,7 +503,67 @@ class TwoCaptcha():
|
|
|
503
503
|
|
|
504
504
|
return result
|
|
505
505
|
|
|
506
|
+
def mtcaptcha(self, sitekey, url, **kwargs):
|
|
507
|
+
'''
|
|
508
|
+
Wrapper for solving MTCaptcha
|
|
509
|
+
|
|
510
|
+
Required:
|
|
511
|
+
sitekey
|
|
512
|
+
url
|
|
513
|
+
|
|
514
|
+
Optional params:
|
|
515
|
+
softId
|
|
516
|
+
callback
|
|
517
|
+
proxy = {'type': 'HTTPS', 'uri': 'login:password@IP_address:PORT'})
|
|
518
|
+
'''
|
|
519
|
+
|
|
520
|
+
result = self.solve(sitekey=sitekey,
|
|
521
|
+
url=url,
|
|
522
|
+
method='mt_captcha',
|
|
523
|
+
**kwargs)
|
|
524
|
+
return result
|
|
525
|
+
|
|
526
|
+
def friendly_captcha(self, sitekey, url, **kwargs):
|
|
527
|
+
'''
|
|
528
|
+
Wrapper for solving Friendly Captcha
|
|
506
529
|
|
|
530
|
+
Required:
|
|
531
|
+
sitekey
|
|
532
|
+
url
|
|
533
|
+
|
|
534
|
+
Optional params:
|
|
535
|
+
softId
|
|
536
|
+
callback
|
|
537
|
+
proxy = {'type': 'HTTPS', 'uri': 'login:password@IP_address:PORT'})
|
|
538
|
+
'''
|
|
539
|
+
|
|
540
|
+
result = self.solve(sitekey=sitekey,
|
|
541
|
+
url=url,
|
|
542
|
+
method='friendly_captcha',
|
|
543
|
+
**kwargs)
|
|
544
|
+
return result
|
|
545
|
+
|
|
546
|
+
def cutcaptcha(self, misery_key, apikey, url, **kwargs):
|
|
547
|
+
'''
|
|
548
|
+
Wrapper for solving Friendly Captcha
|
|
549
|
+
|
|
550
|
+
Required:
|
|
551
|
+
misery_key
|
|
552
|
+
apikey
|
|
553
|
+
url
|
|
554
|
+
|
|
555
|
+
Optional params:
|
|
556
|
+
softId
|
|
557
|
+
callback
|
|
558
|
+
proxy = {'type': 'HTTPS', 'uri': 'login:password@IP_address:PORT'})
|
|
559
|
+
'''
|
|
560
|
+
|
|
561
|
+
result = self.solve(misery_key=misery_key,
|
|
562
|
+
api_key=apikey,
|
|
563
|
+
url=url,
|
|
564
|
+
method='cutcaptcha',
|
|
565
|
+
**kwargs)
|
|
566
|
+
return result
|
|
507
567
|
|
|
508
568
|
def solve(self, timeout=0, polling_interval=0, **kwargs):
|
|
509
569
|
'''
|
{2captcha-python-1.2.2 → 2captcha-python-1.2.3}/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
|