Skip to content

Commit de8a070

Browse files
PBadiceankratzky
andauthored
New types of captcha (#11)
* added new method cyber_siara * fix method * added new method data_dome * added new method mt_captcha * rm ds_store --------- Co-authored-by: kratzky <[email protected]>
1 parent a2db3c0 commit de8a070

File tree

4 files changed

+85
-0
lines changed

4 files changed

+85
-0
lines changed

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,10 @@ build-iPhoneSimulator/
5454

5555
# Used by RuboCop. Remote config files pulled in from inherit_from directive.
5656
# .rubocop-https?--*
57+
58+
# DS_Store
59+
60+
.DS_Store
61+
._.DS_Store
62+
**/.DS_Store
63+
**/._.DS_Store

README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ A Ruby client for the 2Captcha API.
2727
- [GeeTest V4](#geetest-v4)
2828
- [Audio](#audio)
2929
- [Yandex](#yandex)
30+
- [CyberSiARA](#cyber_siara)
31+
- [DataDome](#data-dome)
32+
- [MTCaptcha](#mtcaptcha)
3033
- [Other methods](#other-methods)
3134
- [send / get_result](#send--getresult)
3235
- [balance](#balance)
@@ -326,6 +329,36 @@ result = client.yandex({
326329
})
327330
```
328331

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:[email protected]: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+
329362
## Other methods
330363

331364
### send / get_result

README.ru.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ Ruby-клиент для API 2Captcha.
2525
- [Lemin Cropped Captcha](#lemin-cropped-captcha)
2626
- [GeeTest V4](#geetest-v4)
2727
- [Аудио](#audio)
28+
- [CyberSiARA](#cyber_siara)
29+
- [DataDome](#data-dome)
30+
- [MTCaptcha](#mtcaptcha)
2831
- [Другие методы](#other-methods)
2932
- [send / get_result](#send--getresult)
3033
- [balance](#balance)
@@ -283,6 +286,36 @@ result = client.audio({
283286
})
284287
```
285288

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:[email protected]: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+
286319
## Другие методы
287320

288321
### send / get_result

lib/api_2captcha/client.rb

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,18 @@ def yandex(params)
185185
solve("yandex", params)
186186
end
187187

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+
188200
private
189201

190202
def base_url

0 commit comments

Comments
 (0)