public async Task TestAllOptions() { GeeTest captcha = new GeeTest(); captcha.SetGt("f2ae6cadcf7886856696502e1d55e00c"); captcha.SetApiServer("api-na.geetest.com"); captcha.SetChallenge("69A21A01-CC7B-B9C6-0F9A-E7FA06677FFC"); captcha.SetUrl("https://launches.endclothing.com/distil_r_captcha.html"); var parameters = new Dictionary <string, string>(); parameters["method"] = "geetest"; parameters["gt"] = "f2ae6cadcf7886856696502e1d55e00c"; parameters["api_server"] = "api-na.geetest.com"; parameters["challenge"] = "69A21A01-CC7B-B9C6-0F9A-E7FA06677FFC"; parameters["pageurl"] = "https://launches.endclothing.com/distil_r_captcha.html"; await CheckIfCorrectParamsSendAndResultReturned(captcha, parameters); }
public void Main() { TwoCaptcha solver = new TwoCaptcha("YOUR_API_KEY"); GeeTest captcha = new GeeTest(); captcha.SetGt("f2ae6cadcf7886856696502e1d55e00c"); captcha.SetApiServer("api-na.geetest.com"); captcha.SetChallenge("12345678abc90123d45678ef90123a456b"); captcha.SetUrl("https://mysite.com/captcha.html"); try { solver.Solve(captcha).Wait(); Console.WriteLine("Captcha solved: " + captcha.Code); } catch (AggregateException e) { Console.WriteLine("Error occurred: " + e.InnerExceptions.First().Message); } }
/// <summary> /// GeeTest /// </summary> /// <param name="geeTest">Модель параметров</param> /// <param name="sleep">Время задержки получения ответа</param> /// <returns></returns> public Response GeeTest(GeeTest geeTest, int sleep = 2000) { var response = _request.Get(_urlIn, geeTest.ToString()); return(Check(new Check(response.Request, sleep: sleep))); }
/// <summary> /// Решить капчу от geetest.com /// </summary> /// <param name="geeTest">Модель данных</param> /// <param name="sleep">Задержка получения ответа</param> /// <returns></returns> public TaskResultResp GeeTest(GeeTest geeTest, int sleep = 4000) { var create = CreateTask(new CreateTask(geeTest)); return(GetResult(create, sleep)); }