ruby-2captcha 1.1.0 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d80f00729bbf9f6f08867c59bb5d6e078dbe7675dc14a0b7dd65922ab640663c
4
- data.tar.gz: b8dd22428eab71d775a7d597bd42d661f8ded8cd1b94f30c7c54be507ea5a769
3
+ metadata.gz: 9d00c88ab76dd351845d0e233040e08b26078dc547c6e7cb7735737048fab3ca
4
+ data.tar.gz: 776934ec77a95680867a9ef9f2e64369a50b583c58ac2f64d60c3fc234992ca8
5
5
  SHA512:
6
- metadata.gz: 36f2d745961278c462b64b2cccbc30b6fee82b67e0b4f768f8068babb1c9af5b8e675b88089ad7c81afa33321f288749ac808d01f23966a50c498a70dea4aeac
7
- data.tar.gz: f91c2ec90c7d09edf188c47b9718bf4152f508f808146b965a3be0e8fa69dbf661cc70df9b8634ff760bcdf54d79d44873119abf09bb353f494203139b670c02
6
+ metadata.gz: fc6a083c9106dc517cff5f768ae56981530f92869c726176c22788dc493dec5a38414a21c724d5c791ff8f00edaecdd760b83de4c39a3395c1c32ac1aad61372
7
+ data.tar.gz: 360fe1c592917e0a0b81485a3293194b5bd123a74123828792482db9a64235a0ef2b9c9b25c9d18c97e23c0e9860bee838e926f1e78b870e208aac26fd1e3bf2
data/README.md CHANGED
@@ -27,6 +27,9 @@ 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)
32
+ - [MTCaptcha](#mtcaptcha)
30
33
  - [Other methods](#other-methods)
31
34
  - [send / get_result](#send--getresult)
32
35
  - [balance](#balance)
@@ -273,11 +276,16 @@ result = client.lemin({
273
276
  ```
274
277
 
275
278
  ### Cloudflare Turnstile
276
- Use this method to solve Cloudflare Turnstile. Returns JSON with the token.
279
+ Use this method to solve Cloudflare Turnstile. Returns JSON with the token and User-Agent.
277
280
  ```ruby
278
281
  result = client.turnstile({
279
- sitekey: '0x1AAAAAAAAkg0s2VIOD34y5',
280
- pageurl: 'http://mysite.com/'
282
+ sitekey: "0x0AAAAAAADnPIDROzbs0Aaj",
283
+ data: "7fab0000b0e0ff00",
284
+ pagedata: "3gAFo2...0ME1UVT0=",
285
+ pageurl: "https://2captcha.com/",
286
+ action: "managed",
287
+ userAgent: "Mozilla/5.0 ... Chrome/116.0.0.0 Safari/537.36",
288
+ json: 1
281
289
  })
282
290
  ```
283
291
 
@@ -321,6 +329,36 @@ result = client.yandex({
321
329
  })
322
330
  ```
323
331
 
332
+ ### CyberSiARA
333
+ Use this method to solve CyberSiARA and obtain a token to bypass the protection.
334
+ ```ruby
335
+ result = client.cyber_siara({
336
+ pageurl: "https://test.com",
337
+ master_url_id: "12333-3123123"
338
+ })
339
+ ```
340
+
341
+ ### DataDome
342
+ Use this method to solve DataDome and obtain a token to bypass the protection.
343
+ To solve the DataDome captcha, you must use a proxy.
344
+ ```ruby
345
+ result = client.data_dome({
346
+ pageurl: "https://test.com",
347
+ captcha_url: "https://test.com/captcha/",
348
+ proxytype: "http",
349
+ proxy: "proxyuser:strongPassword@123.123.123.123:3128"
350
+ })
351
+ ```
352
+
353
+ ### MTCaptcha
354
+ Use this method to solve MTCaptcha and obtain a token to bypass the protection.
355
+ ```ruby
356
+ result = client.mt_captcha({
357
+ pageurl: "https://service.mtcaptcha.com/mtcv1/demo/index.html",
358
+ sitekey: "MTPublic-DemoKey9M"
359
+ })
360
+ ```
361
+
324
362
  ## Other methods
325
363
 
326
364
  ### send / get_result
data/README.ru.md CHANGED
@@ -25,6 +25,9 @@ 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)
30
+ - [MTCaptcha](#mtcaptcha)
28
31
  - [Другие методы](#other-methods)
29
32
  - [send / get_result](#send--getresult)
30
33
  - [balance](#balance)
@@ -283,6 +286,36 @@ result = client.audio({
283
286
  })
284
287
  ```
285
288
 
289
+ ### CyberSiARA
290
+ Метод решения CyberSiARA. Он возвращает токен для обхода капчи.
291
+ ```ruby
292
+ result = client.cyber_siara({
293
+ pageurl: "https://test.com",
294
+ master_url_id: "12333-3123123"
295
+ })
296
+ ```
297
+
298
+ ### DataDome
299
+ Метод решения DataDome вернет токен для обхода капчи.
300
+ Чтобы решить капчу DataDome вы должны обязательно использовать прокси.
301
+ ```ruby
302
+ result = client.data_dome({
303
+ pageurl: "https://test.com",
304
+ captcha_url: "https://test.com/captcha/",
305
+ proxytype: "http",
306
+ proxy: "proxyuser:strongPassword@123.123.123.123:3128"
307
+ })
308
+ ```
309
+
310
+ ### MTCaptcha
311
+ Метод решения MTCaptcha. Он возвращает токен для обхода капчи.
312
+ ```ruby
313
+ result = client.mt_captcha({
314
+ pageurl: "https://service.mtcaptcha.com/mtcv1/demo/index.html",
315
+ sitekey: "MTPublic-DemoKey9M"
316
+ })
317
+ ```
318
+
286
319
  ## Другие методы
287
320
 
288
321
  ### send / get_result
@@ -27,7 +27,7 @@ module Api2Captcha
27
27
  @domain = DEFAULT_DOMAIN
28
28
  end
29
29
 
30
- def solve(method, file_path = nil, return_id: false, **params)
30
+ def solve(method, return_id: false, **params)
31
31
  params = params.transform_keys(&:to_s)
32
32
  params["method"] = method
33
33
  params["key"] = @api_key
@@ -185,6 +185,18 @@ module Api2Captcha
185
185
  solve("yandex", params)
186
186
  end
187
187
 
188
+ def cyber_siara(params)
189
+ solve("cybersiara", params)
190
+ end
191
+
192
+ def data_dome(params)
193
+ solve("datadome", params)
194
+ end
195
+
196
+ def mt_captcha(params)
197
+ solve("mt_captcha", params)
198
+ end
199
+
188
200
  private
189
201
 
190
202
  def base_url
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Api2Captcha
4
- VERSION = "1.1.0"
4
+ VERSION = "1.1.2"
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.0
4
+ version: 1.1.2
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-07-04 00:00:00.000000000 Z
11
+ date: 2023-10-10 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.