2captcha-python 2.0.8__py3-none-any.whl → 2.0.9__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.
- {2captcha_python-2.0.8.dist-info → 2captcha_python-2.0.9.dist-info}/METADATA +53 -2
- 2captcha_python-2.0.9.dist-info/RECORD +13 -0
- twocaptcha/__init__.py +1 -1
- twocaptcha/async_solver.py +110 -0
- twocaptcha/solver.py +118 -0
- 2captcha_python-2.0.8.dist-info/RECORD +0 -13
- {2captcha_python-2.0.8.dist-info → 2captcha_python-2.0.9.dist-info}/WHEEL +0 -0
- {2captcha_python-2.0.8.dist-info → 2captcha_python-2.0.9.dist-info}/licenses/LICENSE +0 -0
- {2captcha_python-2.0.8.dist-info → 2captcha_python-2.0.9.dist-info}/top_level.txt +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: 2captcha-python
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.9
|
|
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,FunCaptcha,Geetest,image captcha,Coordinates,Click Captcha,Geetest V4,Lemin captcha,Amazon WAF,Cloudflare Turnstile,Capy Puzzle,MTCaptcha,Friendly Captcha,Tencent,Cutcaptcha,DataDome,VK Captcha,CaptchaFox,Prosopo,cybersiara
|
|
8
|
+
Keywords: 2captcha,captcha,api,captcha solver,reCAPTCHA,FunCaptcha,Geetest,image captcha,Coordinates,Click Captcha,Geetest V4,Lemin captcha,Amazon WAF,Cloudflare Turnstile,Capy Puzzle,MTCaptcha,Friendly Captcha,Tencent,Cutcaptcha,DataDome,VK Captcha,CaptchaFox,Prosopo,cybersiara,Hunt,Alibaba,TSPD,Basilisk
|
|
9
9
|
Classifier: Programming Language :: Python :: 3
|
|
10
10
|
Classifier: License :: OSI Approved :: MIT License
|
|
11
11
|
Classifier: Operating System :: OS Independent
|
|
@@ -84,6 +84,10 @@ Examples of API requests for different captcha types are available on the [Pytho
|
|
|
84
84
|
- [Altcha Captcha](#altcha-Captcha)
|
|
85
85
|
- [Binance](#binance)
|
|
86
86
|
- [Yidun](#yidun)
|
|
87
|
+
- [Hunt](#hunt)
|
|
88
|
+
- [Alibaba](#alibaba)
|
|
89
|
+
- [TSPD](#tspd)
|
|
90
|
+
- [Basilisk](#basilisk)
|
|
87
91
|
- [Other methods](#other-methods)
|
|
88
92
|
- [send / get\_result](#send--get_result)
|
|
89
93
|
- [balance](#balance)
|
|
@@ -593,6 +597,53 @@ result = solver.yidun(sitekey='6b4d7e0c4f5a4c7db2f3a1e8c9d6f123',
|
|
|
593
597
|
)
|
|
594
598
|
```
|
|
595
599
|
|
|
600
|
+
### Hunt
|
|
601
|
+
|
|
602
|
+
<sup>[API method description.](https://2captcha.com/2captcha-api#hunt)</sup>
|
|
603
|
+
|
|
604
|
+
Use this method to solve Hunt captcha. Returns a token.
|
|
605
|
+
```python
|
|
606
|
+
result = solver.hunt(pageurl='https://example.com/page-with-hunt',
|
|
607
|
+
api_get_lib='https://example.com/hd-api/external/apps/app-id/api.js',
|
|
608
|
+
)
|
|
609
|
+
```
|
|
610
|
+
|
|
611
|
+
### Alibaba
|
|
612
|
+
|
|
613
|
+
<sup>[API method description.](https://2captcha.com/2captcha-api#alibaba)</sup>
|
|
614
|
+
|
|
615
|
+
Use this method to solve Alibaba captcha. Returns a token.
|
|
616
|
+
```python
|
|
617
|
+
result = solver.alibaba(pageurl='https://www.example.com',
|
|
618
|
+
scene_id='abc123xyz4',
|
|
619
|
+
prefix='dlw3kug',
|
|
620
|
+
)
|
|
621
|
+
```
|
|
622
|
+
|
|
623
|
+
### TSPD
|
|
624
|
+
|
|
625
|
+
<sup>[API method description.](https://2captcha.com/2captcha-api#tspd)</sup>
|
|
626
|
+
|
|
627
|
+
Use this method to solve TSPD captcha. Returns a JSON string with cookies.
|
|
628
|
+
```python
|
|
629
|
+
result = solver.tspd(pageurl='https://example.com/login',
|
|
630
|
+
tspd_cookie='TS386a400d029=082670...010245; TS386a400d078=082670...dbb3b0c',
|
|
631
|
+
html_page_base64='PCFET0NUWVBFIGh0bWw+...',
|
|
632
|
+
proxy={'type': 'HTTP', 'uri': 'login:password@IP_address:PORT'},
|
|
633
|
+
)
|
|
634
|
+
```
|
|
635
|
+
|
|
636
|
+
### Basilisk
|
|
637
|
+
|
|
638
|
+
<sup>[API method description.](https://2captcha.com/2captcha-api#basilisk)</sup>
|
|
639
|
+
|
|
640
|
+
Use this method to solve Basilisk captcha. Returns a token.
|
|
641
|
+
```python
|
|
642
|
+
result = solver.basilisk(pageurl='https://example.com/login',
|
|
643
|
+
sitekey='b7890h...19fb2600897',
|
|
644
|
+
)
|
|
645
|
+
```
|
|
646
|
+
|
|
596
647
|
## Other methods
|
|
597
648
|
|
|
598
649
|
### send / get_result
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
2captcha_python-2.0.9.dist-info/licenses/LICENSE,sha256=sbILKjQcxUC6dAvBbivnRX9YCshBI9XRvvk1LGkpMEo,1065
|
|
2
|
+
twocaptcha/__init__.py,sha256=U1NdKhMAMoz04nz0G60uLQTiYfbEZLWFVFJx77r59oM,542
|
|
3
|
+
twocaptcha/api.py,sha256=vlYOhc3rGIHOVGq4hZjJ54tUxBpBzI2FgWPctllb7D0,2826
|
|
4
|
+
twocaptcha/async_api.py,sha256=L467rsgdVVrgWaLkvengoTE8GvCgQAfM2PmVO2kfad4,3534
|
|
5
|
+
twocaptcha/async_solver.py,sha256=hnndOFLohAWHZlLW1066Dp9DJI965cX35F1twr5N6Wk,57614
|
|
6
|
+
twocaptcha/solver.py,sha256=hzjb6IbdsGjktK1Kgb7c8NevutfsIl4WMG3W6okxjW0,64698
|
|
7
|
+
twocaptcha/exceptions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
8
|
+
twocaptcha/exceptions/api.py,sha256=N810fZxcNE2AwCM9EyFrXpDpzAKsKi_tHCnRJn4CH7s,86
|
|
9
|
+
twocaptcha/exceptions/solver.py,sha256=hvKUebPMvC51ve6MSmv_3q1J9vkhS90XO2ivoVToyoU,255
|
|
10
|
+
2captcha_python-2.0.9.dist-info/METADATA,sha256=S6sszXxrYF34yPxFgF_XNLbmH2yEnWJ8MjLvvR70i4w,33832
|
|
11
|
+
2captcha_python-2.0.9.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
|
|
12
|
+
2captcha_python-2.0.9.dist-info/top_level.txt,sha256=AvFZdM89oM6Vo97ZTxT9AxHWpwoO3_Qf5ORMV3NClFE,11
|
|
13
|
+
2captcha_python-2.0.9.dist-info/RECORD,,
|
twocaptcha/__init__.py
CHANGED
twocaptcha/async_solver.py
CHANGED
|
@@ -1077,6 +1077,116 @@ class AsyncTwoCaptcha():
|
|
|
1077
1077
|
|
|
1078
1078
|
return await result
|
|
1079
1079
|
|
|
1080
|
+
async def hunt(self, pageurl, api_get_lib, **kwargs):
|
|
1081
|
+
'''Wrapper for solving Hunt captcha.
|
|
1082
|
+
|
|
1083
|
+
Parameters
|
|
1084
|
+
__________
|
|
1085
|
+
pageurl : str
|
|
1086
|
+
Full URL of the page with the captcha.
|
|
1087
|
+
api_get_lib : str
|
|
1088
|
+
Full link to the api.js file that loads the captcha on the page.
|
|
1089
|
+
data : str, optional
|
|
1090
|
+
Value of `meta.token` that the site returned after a request with X-HD.
|
|
1091
|
+
Use only for the captcha solving mode (second step).
|
|
1092
|
+
useragent : str, optional
|
|
1093
|
+
Browser User-Agent used to open the page.
|
|
1094
|
+
proxy : dict, optional
|
|
1095
|
+
{'type': 'HTTPS', 'uri': 'login:password@IP_address:PORT'}.
|
|
1096
|
+
'''
|
|
1097
|
+
result = self.solve(
|
|
1098
|
+
method="hunt",
|
|
1099
|
+
pageurl=pageurl,
|
|
1100
|
+
api_get_lib=api_get_lib,
|
|
1101
|
+
**kwargs)
|
|
1102
|
+
|
|
1103
|
+
return await result
|
|
1104
|
+
|
|
1105
|
+
async def alibaba(self, pageurl, scene_id, prefix, **kwargs):
|
|
1106
|
+
'''Wrapper for solving Alibaba captcha.
|
|
1107
|
+
|
|
1108
|
+
Parameters
|
|
1109
|
+
__________
|
|
1110
|
+
pageurl : str
|
|
1111
|
+
Full URL of the page with the captcha.
|
|
1112
|
+
scene_id : str
|
|
1113
|
+
Captcha scenario identifier.
|
|
1114
|
+
prefix : str
|
|
1115
|
+
Prefix from the captcha loading request subdomain.
|
|
1116
|
+
user_id : str, optional
|
|
1117
|
+
User or session identifier on the website.
|
|
1118
|
+
user_user_id : str, optional
|
|
1119
|
+
Additional user identifier.
|
|
1120
|
+
verify_type : str, optional
|
|
1121
|
+
Verification mechanism version or type.
|
|
1122
|
+
region : str, optional
|
|
1123
|
+
Captcha processing region.
|
|
1124
|
+
user_certify_id : str, optional
|
|
1125
|
+
Verification ID for the current captcha session.
|
|
1126
|
+
api_get_lib : str, optional
|
|
1127
|
+
URL of the Alibaba Captcha JS library.
|
|
1128
|
+
useragent : str, optional
|
|
1129
|
+
Browser User-Agent used to open the page.
|
|
1130
|
+
proxy : dict, optional
|
|
1131
|
+
{'type': 'HTTPS', 'uri': 'login:password@IP_address:PORT'}.
|
|
1132
|
+
'''
|
|
1133
|
+
result = self.solve(
|
|
1134
|
+
method="alibaba",
|
|
1135
|
+
pageurl=pageurl,
|
|
1136
|
+
scene_id=scene_id,
|
|
1137
|
+
prefix=prefix,
|
|
1138
|
+
**kwargs)
|
|
1139
|
+
|
|
1140
|
+
return await result
|
|
1141
|
+
|
|
1142
|
+
async def tspd(self, pageurl, tspd_cookie, html_page_base64, proxy, **kwargs):
|
|
1143
|
+
'''Wrapper for solving TSPD captcha.
|
|
1144
|
+
|
|
1145
|
+
Parameters
|
|
1146
|
+
__________
|
|
1147
|
+
pageurl : str
|
|
1148
|
+
Full URL of the page with the captcha.
|
|
1149
|
+
tspd_cookie : str
|
|
1150
|
+
Cookies received on the TSPD challenge page.
|
|
1151
|
+
html_page_base64 : str
|
|
1152
|
+
Full HTML of the challenge page, Base64 encoded.
|
|
1153
|
+
proxy : dict
|
|
1154
|
+
{'type': 'HTTPS', 'uri': 'login:password@IP_address:PORT'}.
|
|
1155
|
+
useragent : str, optional
|
|
1156
|
+
Browser User-Agent. We recommend sending a valid Windows browser string.
|
|
1157
|
+
'''
|
|
1158
|
+
result = self.solve(
|
|
1159
|
+
method="tspd",
|
|
1160
|
+
pageurl=pageurl,
|
|
1161
|
+
tspd_cookie=tspd_cookie,
|
|
1162
|
+
html_page_base64=html_page_base64,
|
|
1163
|
+
proxy=proxy,
|
|
1164
|
+
**kwargs)
|
|
1165
|
+
|
|
1166
|
+
return await result
|
|
1167
|
+
|
|
1168
|
+
async def basilisk(self, pageurl, sitekey, **kwargs):
|
|
1169
|
+
'''Wrapper for solving Basilisk captcha.
|
|
1170
|
+
|
|
1171
|
+
Parameters
|
|
1172
|
+
__________
|
|
1173
|
+
pageurl : str
|
|
1174
|
+
Full URL of the page with the captcha.
|
|
1175
|
+
sitekey : str
|
|
1176
|
+
The value of the data-site-key parameter found on the page.
|
|
1177
|
+
useragent : str, optional
|
|
1178
|
+
Browser User-Agent used to open the page.
|
|
1179
|
+
proxy : dict, optional
|
|
1180
|
+
{'type': 'HTTPS', 'uri': 'login:password@IP_address:PORT'}.
|
|
1181
|
+
'''
|
|
1182
|
+
result = self.solve(
|
|
1183
|
+
method="basilisk",
|
|
1184
|
+
pageurl=pageurl,
|
|
1185
|
+
sitekey=sitekey,
|
|
1186
|
+
**kwargs)
|
|
1187
|
+
|
|
1188
|
+
return await result
|
|
1189
|
+
|
|
1080
1190
|
async def solve(self, timeout=0, polling_interval=0, **kwargs):
|
|
1081
1191
|
'''Sends captcha, receives result.
|
|
1082
1192
|
|
twocaptcha/solver.py
CHANGED
|
@@ -113,6 +113,14 @@ class TwoCaptcha():
|
|
|
113
113
|
Wrapper for solving Binance captcha.
|
|
114
114
|
yidun(self, sitekey, pageurl, **kwargs)
|
|
115
115
|
Wrapper for solving Yidun captcha.
|
|
116
|
+
hunt(self, pageurl, api_get_lib, **kwargs)
|
|
117
|
+
Wrapper for solving Hunt captcha.
|
|
118
|
+
alibaba(self, pageurl, scene_id, prefix, **kwargs)
|
|
119
|
+
Wrapper for solving Alibaba captcha.
|
|
120
|
+
tspd(self, pageurl, tspd_cookie, html_page_base64, proxy, **kwargs)
|
|
121
|
+
Wrapper for solving TSPD captcha.
|
|
122
|
+
basilisk(self, pageurl, sitekey, **kwargs)
|
|
123
|
+
Wrapper for solving Basilisk captcha.
|
|
116
124
|
solve(timeout=0, polling_interval=0, **kwargs)
|
|
117
125
|
Sends CAPTCHA data and retrieves the result.
|
|
118
126
|
balance()
|
|
@@ -1219,6 +1227,116 @@ class TwoCaptcha():
|
|
|
1219
1227
|
|
|
1220
1228
|
return result
|
|
1221
1229
|
|
|
1230
|
+
def hunt(self, pageurl, api_get_lib, **kwargs):
|
|
1231
|
+
'''Wrapper for solving Hunt captcha.
|
|
1232
|
+
|
|
1233
|
+
Parameters
|
|
1234
|
+
__________
|
|
1235
|
+
pageurl : str
|
|
1236
|
+
Full URL of the page with the captcha.
|
|
1237
|
+
api_get_lib : str
|
|
1238
|
+
Full link to the api.js file that loads the captcha on the page.
|
|
1239
|
+
data : str, optional
|
|
1240
|
+
Value of `meta.token` that the site returned after a request with X-HD.
|
|
1241
|
+
Use only for the captcha solving mode (second step).
|
|
1242
|
+
useragent : str, optional
|
|
1243
|
+
Browser User-Agent used to open the page.
|
|
1244
|
+
proxy : dict, optional
|
|
1245
|
+
{'type': 'HTTPS', 'uri': 'login:password@IP_address:PORT'}.
|
|
1246
|
+
'''
|
|
1247
|
+
result = self.solve(
|
|
1248
|
+
method="hunt",
|
|
1249
|
+
pageurl=pageurl,
|
|
1250
|
+
api_get_lib=api_get_lib,
|
|
1251
|
+
**kwargs)
|
|
1252
|
+
|
|
1253
|
+
return result
|
|
1254
|
+
|
|
1255
|
+
def alibaba(self, pageurl, scene_id, prefix, **kwargs):
|
|
1256
|
+
'''Wrapper for solving Alibaba captcha.
|
|
1257
|
+
|
|
1258
|
+
Parameters
|
|
1259
|
+
__________
|
|
1260
|
+
pageurl : str
|
|
1261
|
+
Full URL of the page with the captcha.
|
|
1262
|
+
scene_id : str
|
|
1263
|
+
Captcha scenario identifier.
|
|
1264
|
+
prefix : str
|
|
1265
|
+
Prefix from the captcha loading request subdomain.
|
|
1266
|
+
user_id : str, optional
|
|
1267
|
+
User or session identifier on the website.
|
|
1268
|
+
user_user_id : str, optional
|
|
1269
|
+
Additional user identifier.
|
|
1270
|
+
verify_type : str, optional
|
|
1271
|
+
Verification mechanism version or type.
|
|
1272
|
+
region : str, optional
|
|
1273
|
+
Captcha processing region.
|
|
1274
|
+
user_certify_id : str, optional
|
|
1275
|
+
Verification ID for the current captcha session.
|
|
1276
|
+
api_get_lib : str, optional
|
|
1277
|
+
URL of the Alibaba Captcha JS library.
|
|
1278
|
+
useragent : str, optional
|
|
1279
|
+
Browser User-Agent used to open the page.
|
|
1280
|
+
proxy : dict, optional
|
|
1281
|
+
{'type': 'HTTPS', 'uri': 'login:password@IP_address:PORT'}.
|
|
1282
|
+
'''
|
|
1283
|
+
result = self.solve(
|
|
1284
|
+
method="alibaba",
|
|
1285
|
+
pageurl=pageurl,
|
|
1286
|
+
scene_id=scene_id,
|
|
1287
|
+
prefix=prefix,
|
|
1288
|
+
**kwargs)
|
|
1289
|
+
|
|
1290
|
+
return result
|
|
1291
|
+
|
|
1292
|
+
def tspd(self, pageurl, tspd_cookie, html_page_base64, proxy, **kwargs):
|
|
1293
|
+
'''Wrapper for solving TSPD captcha.
|
|
1294
|
+
|
|
1295
|
+
Parameters
|
|
1296
|
+
__________
|
|
1297
|
+
pageurl : str
|
|
1298
|
+
Full URL of the page with the captcha.
|
|
1299
|
+
tspd_cookie : str
|
|
1300
|
+
Cookies received on the TSPD challenge page.
|
|
1301
|
+
html_page_base64 : str
|
|
1302
|
+
Full HTML of the challenge page, Base64 encoded.
|
|
1303
|
+
proxy : dict
|
|
1304
|
+
{'type': 'HTTPS', 'uri': 'login:password@IP_address:PORT'}.
|
|
1305
|
+
useragent : str, optional
|
|
1306
|
+
Browser User-Agent. We recommend sending a valid Windows browser string.
|
|
1307
|
+
'''
|
|
1308
|
+
result = self.solve(
|
|
1309
|
+
method="tspd",
|
|
1310
|
+
pageurl=pageurl,
|
|
1311
|
+
tspd_cookie=tspd_cookie,
|
|
1312
|
+
html_page_base64=html_page_base64,
|
|
1313
|
+
proxy=proxy,
|
|
1314
|
+
**kwargs)
|
|
1315
|
+
|
|
1316
|
+
return result
|
|
1317
|
+
|
|
1318
|
+
def basilisk(self, pageurl, sitekey, **kwargs):
|
|
1319
|
+
'''Wrapper for solving Basilisk captcha.
|
|
1320
|
+
|
|
1321
|
+
Parameters
|
|
1322
|
+
__________
|
|
1323
|
+
pageurl : str
|
|
1324
|
+
Full URL of the page with the captcha.
|
|
1325
|
+
sitekey : str
|
|
1326
|
+
The value of the data-site-key parameter found on the page.
|
|
1327
|
+
useragent : str, optional
|
|
1328
|
+
Browser User-Agent used to open the page.
|
|
1329
|
+
proxy : dict, optional
|
|
1330
|
+
{'type': 'HTTPS', 'uri': 'login:password@IP_address:PORT'}.
|
|
1331
|
+
'''
|
|
1332
|
+
result = self.solve(
|
|
1333
|
+
method="basilisk",
|
|
1334
|
+
pageurl=pageurl,
|
|
1335
|
+
sitekey=sitekey,
|
|
1336
|
+
**kwargs)
|
|
1337
|
+
|
|
1338
|
+
return result
|
|
1339
|
+
|
|
1222
1340
|
|
|
1223
1341
|
def solve(self, timeout=0, polling_interval=0, **kwargs):
|
|
1224
1342
|
'''Sends captcha, receives result.
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
2captcha_python-2.0.8.dist-info/licenses/LICENSE,sha256=sbILKjQcxUC6dAvBbivnRX9YCshBI9XRvvk1LGkpMEo,1065
|
|
2
|
-
twocaptcha/__init__.py,sha256=ciSn_PMHS81L98Et6kL_QfRftiJXyEj9XohvLBtqsRg,542
|
|
3
|
-
twocaptcha/api.py,sha256=vlYOhc3rGIHOVGq4hZjJ54tUxBpBzI2FgWPctllb7D0,2826
|
|
4
|
-
twocaptcha/async_api.py,sha256=L467rsgdVVrgWaLkvengoTE8GvCgQAfM2PmVO2kfad4,3534
|
|
5
|
-
twocaptcha/async_solver.py,sha256=XOATNoergtZqSsIQgLuTWwTnyMVl8DviMaf4w7iDrTo,53885
|
|
6
|
-
twocaptcha/solver.py,sha256=-K1y-rUx_taiHvq6gCq6b9ZwrCzR03GH7m3VkNREEAo,60621
|
|
7
|
-
twocaptcha/exceptions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
8
|
-
twocaptcha/exceptions/api.py,sha256=N810fZxcNE2AwCM9EyFrXpDpzAKsKi_tHCnRJn4CH7s,86
|
|
9
|
-
twocaptcha/exceptions/solver.py,sha256=hvKUebPMvC51ve6MSmv_3q1J9vkhS90XO2ivoVToyoU,255
|
|
10
|
-
2captcha_python-2.0.8.dist-info/METADATA,sha256=QNNlsByYVDXJJgqzC492qGBM5gLzCwrGrPNG-q6YCWk,32204
|
|
11
|
-
2captcha_python-2.0.8.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
|
|
12
|
-
2captcha_python-2.0.8.dist-info/top_level.txt,sha256=AvFZdM89oM6Vo97ZTxT9AxHWpwoO3_Qf5ORMV3NClFE,11
|
|
13
|
-
2captcha_python-2.0.8.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|