Skip to content

Commit c635703

Browse files
committed
feat: yandex smart
1 parent 7b65360 commit c635703

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

twocaptcha/solver.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -856,6 +856,33 @@ def cybersiara(self, master_url_id, pageurl, userAgent, **kwargs):
856856
**kwargs)
857857
return result
858858

859+
def yandex_smart(self, sitekey, url, **kwargs):
860+
'''Wrapper for solving Yandex Smart.
861+
862+
Parameters
863+
__________
864+
sitekey : str
865+
The value of data-sitekey attribute of captcha's div element on page.
866+
url : str
867+
Full URL of the page where you solve the captcha.
868+
softId : int, optional
869+
ID of software developer. Developers who integrated their software with 2Captcha get reward: 10% of
870+
spendings of their software users.
871+
callback : str, optional
872+
URL for pingback (callback) response that will be sent when captcha is solved. URL should be registered on
873+
the server. More info here https://2captcha.com/2captcha-api#pingback.
874+
proxy : dict, optional
875+
{'type': 'HTTPS', 'uri': 'login:password@IP_address:PORT'}.
876+
userAgent: str, optional
877+
User-Agent of the browser that will be used by the employee when loading the captcha.
878+
'''
879+
880+
result = self.solve(sitekey=sitekey,
881+
url=url,
882+
method='yandex',
883+
**kwargs)
884+
return result
885+
859886
def solve(self, timeout=0, polling_interval=0, **kwargs):
860887
'''Sends captcha, receives result.
861888

0 commit comments

Comments
 (0)