예제 #1
0
        // methods
        private async Task solveCaptcha(Job j)
        {
            string captchaResponse = null;

            j.Status = "Getting captcha response...";

            if (Manager.use2Captcha)
            {
                _2Captcha captcha = new _2Captcha(Manager.myKey, Manager.siteKey);
                captchaResponse = await captcha.solveCaptcha();
            }
            else if (Manager.useAntiCaptcha)
            {
                AntiCaptcha captcha = new AntiCaptcha(Manager.myKey, Manager.siteKey);
                captchaResponse = captcha.solveCaptcha();
            }


            if (captchaResponse == "false")
            {
                j.Status = "Error Getting Captcha!";
            }
            else
            {
                //_status = true;
                j.Status          = "Got captcha response!";
                j.CaptchaResponse = captchaResponse;
            }
        }