@@ -43,7 +43,38 @@ def __init__(self,
43
43
pollingInterval = 10 ,
44
44
server = '2captcha.com' ,
45
45
extendedResponse = None ):
46
+ """
47
+ Class constructor for interacting with the 2captcha API.
46
48
49
+ Parameters
50
+ __________
51
+ apiKey : str
52
+ Your personal API key in your account settings.
53
+ softId : int, optional
54
+ Your software ID obtained after publishing in 2captcha software catalog - https://2captcha.com/software.
55
+ Default: 4580.
56
+ callback : str, optional
57
+ URL of your web server that receives the captcha recognition result.
58
+ The URL should be first registered in pingback - https://2captcha.com/setting/pingback - settings of your account.
59
+ Default: None.
60
+ defaultTimeout : int, optional
61
+ Polling timeout in seconds for all captcha types except reCAPTCHA.
62
+ Defines how long the module tries to get the answer from the res.php API endpoint.
63
+ Default: 120.
64
+ recaptchaTimeout : int, optional
65
+ Polling timeout for reCAPTCHA in seconds. Defines how long the module tries to get the answer from the res.php API endpoint.
66
+ Default: 600.
67
+ pollingInterval : int, optional
68
+ Interval in seconds between requests to the res.php API endpoint. Setting values less than 5 seconds is not recommended.
69
+ Default: 10.
70
+ server : str, optional
71
+ API server. You can set it to rucaptcha.com if your account is registered there.
72
+ Default: 2captcha.com.
73
+ extendedResponse : bool, optional
74
+ Set to True to get the response with additional fields or in more practical format (enables JSON response from
75
+ res.php API endpoint). Suitable for hCaptcha, ClickCaptcha, Canvas.
76
+ Default: None.
77
+ """
47
78
self .API_KEY = apiKey
48
79
self .soft_id = softId
49
80
self .callback = callback
@@ -162,7 +193,7 @@ def recaptcha(self, sitekey, url, version='v2', enterprise=0, **kwargs):
162
193
'''Wrapper for solving recaptcha (v2, v3).
163
194
164
195
Parameters
165
- _______________
196
+ __________
166
197
sitekey : str
167
198
Value of sitekey parameter you found on page.
168
199
url : str
@@ -224,7 +255,7 @@ def funcaptcha(self, sitekey, url, **kwargs):
224
255
Tells us to use your user-agent value.
225
256
data[key] : str, optional
226
257
Custom data to pass to FunCaptcha. For example: data[blob]=stringValue.
227
- softId : str , optional
258
+ softId : int , optional
228
259
ID of software developer. Developers who integrated their software with 2Captcha get reward: 10% of
229
260
spendings of their software users.
230
261
callback : str, optional
@@ -243,7 +274,7 @@ def funcaptcha(self, sitekey, url, **kwargs):
243
274
def geetest (self , gt , challenge , url , ** kwargs ):
244
275
'''Wrapper for solving geetest captcha.
245
276
246
- Parameters:
277
+ Parameters
247
278
__________
248
279
gt : str
249
280
Value of gt parameter you found on target website.
@@ -933,7 +964,7 @@ def send(self, **kwargs):
933
964
"""This method can be used for manual captcha submission
934
965
935
966
Parameters
936
- _________
967
+ __________
937
968
method : str
938
969
The name of the method must be found in the documentation https://2captcha.com/2captcha-api
939
970
kwargs: dict
0 commit comments