public async Task TestV2() { ReCaptcha captcha = new ReCaptcha(); captcha.SetSiteKey("6Le-wvkSVVABCPBMRTvw0Q4Muexq1bi0DJwx_mJ-"); captcha.SetUrl("https://mysite.com/page/with/recaptcha"); captcha.SetInvisible(true); captcha.SetAction("verify"); var parameters = new Dictionary <string, string>(); parameters["method"] = "userrecaptcha"; parameters["googlekey"] = "6Le-wvkSVVABCPBMRTvw0Q4Muexq1bi0DJwx_mJ-"; parameters["pageurl"] = "https://mysite.com/page/with/recaptcha"; parameters["invisible"] = "1"; parameters["action"] = "verify"; await CheckIfCorrectParamsSendAndResultReturned(captcha, parameters); }
public void Main() { TwoCaptcha solver = new TwoCaptcha("YOUR_API_KEY"); ReCaptcha captcha = new ReCaptcha(); captcha.SetSiteKey("6Le-wvkSVVABCPBMRTvw0Q4Muexq1bi0DJwx_mJ-"); captcha.SetUrl("https://mysite.com/page/with/recaptcha"); captcha.SetInvisible(true); captcha.SetAction("verify"); captcha.SetProxy("HTTPS", "login:password@IP_address:PORT"); try { solver.Solve(captcha).Wait(); Console.WriteLine("Captcha solved: " + captcha.Code); } catch (AggregateException e) { Console.WriteLine("Error occurred: " + e.InnerExceptions.First().Message); } }