8000 recaptcha mobile type · nextcaptcha/nextcaptcha-python@95e19f8 · GitHub
[go: up one dir, main page]

Skip to content

Commit 95e19f8

Browse files
author
nextcaptcha
committed
recaptcha mobile type
1 parent 5000364 commit 95e19f8

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

nextcaptcha/next.py

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
RECAPTCHAV2_ENTERPRISE_TYPE = "RecaptchaV2EnterpriseTaskProxyless"
1010
RECAPTCHAV3_PROXYLESS_TYPE = "RecaptchaV3TaskProxyless"
1111
RECAPTCHAV3_TYPE = "RecaptchaV3Task"
12-
RECAPTCHA_MOBILE_TYPE = "RecaptchaMobileProxyless"
12+
RECAPTCHA_MOBILE_PROXYLESS_TYPE = "ReCaptchaMobileTaskProxyLess"
13+
RECAPTCHA_MOBILE_TYPE = "ReCaptchaMobileTask"
1314
HCAPTCHA_TYPE = "HCaptchaTask"
1415
HCAPTCHA_PROXYLESS_TYPE = "HCaptchaTaskProxyless"
1516
HCAPTCHA_ENTERPRISE_TYPE = "HCaptchaEnterpriseTask"
@@ -174,7 +175,9 @@ def recaptchav3(self, website_url: str, website_key: str, page_action: str = "",
174175
task["proxyPassword"] = proxy_password
175176
return self.api._send(task)
176177

177-
def recaptcha_mobile(self, app_key: str, app_package_name: str = "", app_action: str = "") -> dict:
178+
def recaptcha_mobile(self, app_key: str, app_package_name: str = "", app_action: str = "", proxy_type: str = "",
179+
proxy_address: str = "", proxy_port: int = 0, proxy_login: str = "",
180+
proxy_password: str = "") -> dict:
178181
"""
179182
Solve Mobile reCAPTCHA challenge.
180183
@@ -184,11 +187,18 @@ def recaptcha_mobile(self, app_key: str, app_package_name: str = "", app_action:
184187
:return: A dictionary containing the solution of the Mobile reCAPTCHA.
185188
"""
186189
task = {
187-
"type": RECAPTCHA_MOBILE_TYPE,
190+
"type": RECAPTCHA_MOBILE_PROXYLESS_TYPE,
188191
"appKey": app_key,
189192
"appPackageName": app_package_name,
190193
"appAction": app_action,
191194
}
195+
if proxy_address != "":
196+
task["type"] = RECAPTCHA_MOBILE_TYPE
197+
task["proxyType"] = proxy_type
198+
task["proxyAddress"] = proxy_address
199+
task["proxyPort"] = proxy_port
200+
task["proxyLogin"] = proxy_login
201+
task["proxyPassword"] = proxy_password
192202
return self.api._send(task)
193203

194204
def hcaptcha(self, website_url: str, website_key: str, is_invisible: bool = False, enterprise_payload: dict = {},

0 commit comments

Comments
 (0)
0