ruby-2captcha 1.1.3 → 1.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +14 -3
- data/README.ru.md +13 -3
- data/lib/api_2captcha/client.rb +8 -4
- data/lib/api_2captcha/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b17960788d337b014b4337b32068a6ded3315e92fd649c28c0df2b0ba8d2cf09
|
4
|
+
data.tar.gz: 8b4b808a9d0b1696758bd21a8fe6b8cdeb584f1244416e3d86df83595c4003db
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c288e20b91dd6b780f0acbc9f9bcf66428954b37d88505ce54330f88e320e775fe6eeccf8ebb621637376d409f0c5a702cb2d5a9d45a3e63ce612ea0a038d2a6
|
7
|
+
data.tar.gz: 7304970593279b972e1b85b22b430b7f271d9f0cc85afca244b4b24024bcf4607db17bd0701086b0035d30b7076631aa43de6e06215746e293304feaacd70187
|
data/README.md
CHANGED
@@ -27,11 +27,12 @@ A Ruby client for the 2Captcha API.
|
|
27
27
|
- [GeeTest V4](#geetest-v4)
|
28
28
|
- [Audio](#audio)
|
29
29
|
- [Yandex](#yandex)
|
30
|
-
- [CyberSiARA](#
|
31
|
-
- [DataDome](#
|
30
|
+
- [CyberSiARA](#cybersiara)
|
31
|
+
- [DataDome](#datadome)
|
32
32
|
- [MTCaptcha](#mtcaptcha)
|
33
|
+
- [Friendly captcha](#friendly-captcha)
|
33
34
|
- [Other methods](#other-methods)
|
34
|
-
- [send / get_result](#send--
|
35
|
+
- [send / get_result](#send--get_result)
|
35
36
|
- [balance](#balance)
|
36
37
|
- [report](#report)
|
37
38
|
- [Error handling](#error-handling)
|
@@ -359,9 +360,19 @@ result = client.mt_captcha({
|
|
359
360
|
})
|
360
361
|
```
|
361
362
|
|
363
|
+
### Friendly captcha
|
364
|
+
Use this method to solve Friendly captcha and obtain a token to bypass the protection.
|
365
|
+
```ruby
|
366
|
+
result = client.friendly_captcha({
|
367
|
+
pageurl: "https://example.com",
|
368
|
+
sitekey: "2FZFEVS1FZCGQ9"
|
369
|
+
})
|
370
|
+
```
|
371
|
+
|
362
372
|
## Other methods
|
363
373
|
|
364
374
|
### send / get_result
|
375
|
+
|
365
376
|
These methods can be used for manual captcha submission and answer polling.
|
366
377
|
```ruby
|
367
378
|
|
data/README.ru.md
CHANGED
@@ -25,11 +25,12 @@ Ruby-клиент для API 2Captcha.
|
|
25
25
|
- [Lemin Cropped Captcha](#lemin-cropped-captcha)
|
26
26
|
- [GeeTest V4](#geetest-v4)
|
27
27
|
- [Аудио](#audio)
|
28
|
-
- [CyberSiARA](#
|
29
|
-
- [DataDome](#
|
28
|
+
- [CyberSiARA](#cybersiara)
|
29
|
+
- [DataDome](#datadome)
|
30
30
|
- [MTCaptcha](#mtcaptcha)
|
31
|
+
- [Friendly captcha](#friendly-captcha)
|
31
32
|
- [Другие методы](#other-methods)
|
32
|
-
- [send / get_result](#send--
|
33
|
+
- [send / get_result](#send--get_result)
|
33
34
|
- [balance](#balance)
|
34
35
|
- [report](#report)
|
35
36
|
- [Обработка ошибок](#error-handling)
|
@@ -316,6 +317,15 @@ result = client.mt_captcha({
|
|
316
317
|
})
|
317
318
|
```
|
318
319
|
|
320
|
+
### Friendly captcha
|
321
|
+
Метод решения Friendly captcha. Он возвращает токен для обхода капчи.
|
322
|
+
```ruby
|
323
|
+
result = client.friendly_captcha({
|
324
|
+
pageurl: "https://example.com",
|
325
|
+
sitekey: "2FZFEVS1FZCGQ9"
|
326
|
+
})
|
327
|
+
```
|
328
|
+
|
319
329
|
## Другие методы
|
320
330
|
|
321
331
|
### send / get_result
|
data/lib/api_2captcha/client.rb
CHANGED
@@ -10,20 +10,20 @@ module Api2Captcha
|
|
10
10
|
DEFAULT_DOMAIN = "2captcha.com"
|
11
11
|
BASE_URL_FORMAT = "https://%s"
|
12
12
|
|
13
|
-
attr_reader :api_key, :soft_id
|
14
|
-
|
15
13
|
attr_accessor :domain, :callback,
|
16
14
|
:default_timeout,
|
17
15
|
:recaptcha_timeout,
|
18
|
-
:polling_interval
|
16
|
+
:polling_interval,
|
17
|
+
:api_key, :soft_id
|
19
18
|
|
20
|
-
def initialize(api_key,
|
19
|
+
def initialize(api_key, callback = nil)
|
21
20
|
@api_key = api_key
|
22
21
|
@soft_id = soft_id
|
23
22
|
@callback = callback
|
24
23
|
@default_timeout = 120
|
25
24
|
@recaptcha_timeout = 600
|
26
25
|
@polling_interval = 10
|
26
|
+
@soft_id = 0
|
27
27
|
@domain = DEFAULT_DOMAIN
|
28
28
|
end
|
29
29
|
|
@@ -197,6 +197,10 @@ module Api2Captcha
|
|
197
197
|
solve("mt_captcha", **params)
|
198
198
|
end
|
199
199
|
|
200
|
+
def friendly(params)
|
201
|
+
solve("friendly_captcha", **params)
|
202
|
+
end
|
203
|
+
|
200
204
|
private
|
201
205
|
|
202
206
|
def base_url
|
data/lib/api_2captcha/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-2captcha
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- 2captcha.com
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-01-23 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Ruby package for easy integration with the API of 2captcha captcha solving
|
14
14
|
service to bypass recaptcha, hcaptcha, funcaptcha, geetest and solve any other captchas.
|