From 1a64d15514cdd2c65ce5493cd91b819daee07004 Mon Sep 17 00:00:00 2001 From: PBadicean Date: Tue, 13 Feb 2024 15:25:53 +0200 Subject: [PATCH] added method cutcaptcha --- README.md | 12 ++++++++++++ README.ru.md | 12 ++++++++++++ lib/api_2captcha/client.rb | 4 ++++ 3 files changed, 28 insertions(+) diff --git a/README.md b/README.md index 1c72ef3..a4027bb 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,7 @@ A Ruby client for the 2Captcha API. - [reCAPTCHA v2](#recaptcha-v2) - [reCAPTCHA v3](#recaptcha-v3) - [reCAPTCHA Enterprise](#recaptcha-enterprise) + - [FunCaptcha](#funcaptcha) - [GeeTest](#geetest) - [hCaptcha](#hcaptcha) - [KeyCaptcha](#keycaptcha) @@ -31,6 +32,7 @@ A Ruby client for the 2Captcha API. - [DataDome](#datadome) - [MTCaptcha](#mtcaptcha) - [Friendly captcha](#friendly-captcha) + - [Cutcaptcha](#cutcaptcha) - [Other methods](#other-methods) - [send / get_result](#send--get_result) - [balance](#balance) @@ -369,6 +371,16 @@ result = client.friendly({ }) ``` +### Cutcaptcha +Use this method to solve Cutcaptcha and obtain a token to bypass the protection. +```ruby +result = client.cutcaptcha({ + misery_key: "a1488b66da00bf332a1488993a5443c79047e752", + api_key: "SAb83IIB", + pageurl: "https://example.cc/foo/bar.html" +}) +``` + ## Other methods ### send / get_result diff --git a/README.ru.md b/README.ru.md index 8775a12..9caea88 100644 --- a/README.ru.md +++ b/README.ru.md @@ -12,6 +12,7 @@ Ruby-клиент для API 2Captcha. - [Текстовая капча](#text-captcha) - [ReCaptcha v2](#recaptcha-v2) - [ReCaptcha v3](#recaptcha-v3) + - [FunCaptcha](#funcaptcha) - [GeeTest](#geetest) - [hCaptcha](#hcaptcha) - [KeyCaptcha](#keycaptcha) @@ -29,6 +30,7 @@ Ruby-клиент для API 2Captcha. - [DataDome](#datadome) - [MTCaptcha](#mtcaptcha) - [Friendly captcha](#friendly-captcha) + - [Cutcaptcha](#cutcaptcha) - [Другие методы](#other-methods) - [send / get_result](#send--get_result) - [balance](#balance) @@ -326,6 +328,16 @@ result = client.friendly({ }) ``` +### Cutcaptcha +Метод решения Cutcaptcha. Он возвращает токен для обхода капчи. +```ruby +result = client.cutcaptcha({ + misery_key: "a1488b66da00bf332a1488993a5443c79047e752", + api_key: "SAb83IIB", + pageurl: "https://example.cc/foo/bar.html" +}) +``` + ## Другие методы ### send / get_result diff --git a/lib/api_2captcha/client.rb b/lib/api_2captcha/client.rb index 5a5548c..60fc8ee 100644 --- a/lib/api_2captcha/client.rb +++ b/lib/api_2captcha/client.rb @@ -201,6 +201,10 @@ def friendly(params) solve("friendly_captcha", **params) end + def cutcaptcha(params) + solve("cutcaptcha", **params) + end + private def base_url