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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c7b52e0a9284ce8442474411fdf0960617d4babcc599818d99f932f072abfd64
4
- data.tar.gz: 4df6ef3259899fca4273d67b36c769407321f1afb5339eb5b31f0def4b88b7c8
3
+ metadata.gz: b17960788d337b014b4337b32068a6ded3315e92fd649c28c0df2b0ba8d2cf09
4
+ data.tar.gz: 8b4b808a9d0b1696758bd21a8fe6b8cdeb584f1244416e3d86df83595c4003db
5
5
  SHA512:
6
- metadata.gz: c12d2955ced9e0acee9693456ec3ba0b265c33aacbf4e8f5583e1dd9c896f51588e0f32afa9e940a051ad219c7817b8c2b34f8ed034cd1382e0c28adf15f38e1
7
- data.tar.gz: 5ffbf507b9b8802d900d506b5bbae1a2bb2abedc9daf3cfd02eec9d7ce71f1a819394c13a2d96e67fd40e7b379684492b88520e5a74465f74a9683a46409e534
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](#cyber_siara)
31
- - [DataDome](#data-dome)
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--getresult)
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](#cyber_siara)
29
- - [DataDome](#data-dome)
28
+ - [CyberSiARA](#cybersiara)
29
+ - [DataDome](#datadome)
30
30
  - [MTCaptcha](#mtcaptcha)
31
+ - [Friendly captcha](#friendly-captcha)
31
32
  - [Другие методы](#other-methods)
32
- - [send / get_result](#send--getresult)
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
@@ -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, soft_id = 0, callback = nil)
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Api2Captcha
4
- VERSION = "1.1.3"
4
+ VERSION = "1.1.4"
5
5
  end
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.3
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: 2023-10-26 00:00:00.000000000 Z
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.