@GamiD Вот функция, там всего один простой запрос, думаю разберешься
func getSolution(key, token string) (string, error) { url := fmt.Sprintf("https://www.google.com/recaptcha/api2/reload?k=%s", key) payload := fmt.Sprintf("reason=q&c=%s&size=invisible", token) resp, err := http.Post(url, "application/x-www-form-urlencoded", strings.NewReader(payload)) if err != nil { return "", err } defer resp.Body.Close() if resp.StatusCode != http.StatusOK { return "", fmt.Errorf("Failed to retrieve solution: %v", resp.Status) } // Read the response body body, err := io.ReadAll(resp.Body) if err != nil { return "", err } re := regexp.MustCompile(`"rresp","(.*?)",`) match := re.FindStringSubmatch(string(body)) if len(match) < 2 { return "", fmt.Errorf("Failed to extract 'rresp' value from the response body") } solution := match[1] return solution, nil }Решение Recaptcha
-
Всем привет!
Знаю и работаю с кодом для rucaptcha на post/getsolver_properties_clear("rucaptcha") rucaptcha(RUCAPTCHA_KEY) solver_property("rucaptcha","method","userrecaptcha") solver_property("rucaptcha","googlekey",DATA_SITEKEY) solver_property("rucaptcha","pageurl",URL) solve_base64("rucaptcha", "")! [[RES]] = _result()Как решить капчу другими сервисами, например anti-captcha или 2captcha?
-
@dmitr Я вас наверное удивлю, но примерно так -
solver_properties_clear("antigate-newapi") antigate-newapi(RUCAPTCHA_KEY) solver_property("antigate-newapi","method","userrecaptcha") solver_property("antigate-newapi","googlekey",DATA_SITEKEY) solver_property("antigate-newapi","pageurl",URL) solve_base64("antigate-newapi", "")! [[RES]] = _result() -
@dmitr said in Решение Recaptcha:
Всем привет!
Как решить капчу другими сервисами, например anti-captcha или 2captcha?antigate сменили api и теперь этот код работать не будет
solver_properties_clear("antigate") antigate([[KEY]]) solver_property("antigate","method","userrecaptcha") solver_property("antigate","googlekey",DATA_SITEKEY) solver_property("antigate","pageurl",URL) solve_base64("antigate", "")! [[RES]] = _result()
2captcha
solver_properties_clear("2captcha") twocaptcha([[KEY]]) solver_property("2captcha","method","userrecaptcha") solver_property("2captcha","googlekey",DATA_SITEKEY) solver_property("2captcha","pageurl",URL) solve_base64("2captcha", "")! [[RES]] = _result()
rucaptcha
solver_properties_clear("rucaptcha") rucaptcha([[KEY]]) solver_property("rucaptcha","method","userrecaptcha") solver_property("rucaptcha","googlekey",DATA_SITEKEY) solver_property("rucaptcha","pageurl",URL) solve_base64("rucaptcha", "")! [[RES]] = _result()
Пример решения можно посмотреть в модуле рекапчи, в файле
BrowserAutomationStudio\apps\21.7.2\modules\ReCaptcha2\engine.js -
solver_properties_clear("rucaptcha"); rucaptcha( {{ApiKey}} ); solver_property("rucaptcha","method","userrecaptcha"); solver_property("rucaptcha","googlekey", [[SITEKEY]] ); solver_property("rucaptcha","pageurl", [[ACT_LINK]] ) solver_property("rucaptcha","serverurl", "https://api.captcha.guru/" ); solve_base64("rucaptcha", "")! [[RES]] = _result()
