Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,10 @@ build-iPhoneSimulator/

# Used by RuboCop. Remote config files pulled in from inherit_from directive.
# .rubocop-https?--*

# DS_Store

.DS_Store
._.DS_Store
**/.DS_Store
**/._.DS_Store
33 changes: 33 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ A Ruby client for the 2Captcha API.
- [GeeTest V4](#geetest-v4)
- [Audio](#audio)
- [Yandex](#yandex)
- [CyberSiARA](#cyber_siara)
- [DataDome](#data-dome)
- [MTCaptcha](#mtcaptcha)
- [Other methods](#other-methods)
- [send / get_result](#send--getresult)
- [balance](#balance)
Expand Down Expand Up @@ -326,6 +329,36 @@ result = client.yandex({
})
```

### CyberSiARA
Use this method to solve CyberSiARA and obtain a token to bypass the protection.
```ruby
result = client.cyber_siara({
pageurl: "https://test.com",
master_url_id: "12333-3123123"
})
```

### DataDome
Use this method to solve DataDome and obtain a token to bypass the protection.
To solve the DataDome captcha, you must use a proxy.
```ruby
result = client.data_dome({
pageurl: "https://test.com",
captcha_url: "https://test.com/captcha/",
proxytype: "http",
proxy: "proxyuser:strongPassword@123.123.123.123:3128"
})
```

### MTCaptcha
Use this method to solve MTCaptcha and obtain a token to bypass the protection.
```ruby
result = client.mt_captcha({
pageurl: "https://service.mtcaptcha.com/mtcv1/demo/index.html",
sitekey: "MTPublic-DemoKey9M"
})
```

## Other methods

### send / get_result
Expand Down
33 changes: 33 additions & 0 deletions README.ru.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ Ruby-клиент для API 2Captcha.
- [Lemin Cropped Captcha](#lemin-cropped-captcha)
- [GeeTest V4](#geetest-v4)
- [Аудио](#audio)
- [CyberSiARA](#cyber_siara)
- [DataDome](#data-dome)
- [MTCaptcha](#mtcaptcha)
- [Другие методы](#other-methods)
- [send / get_result](#send--getresult)
- [balance](#balance)
Expand Down Expand Up @@ -283,6 +286,36 @@ result = client.audio({
})
```

### CyberSiARA
Метод решения CyberSiARA. Он возвращает токен для обхода капчи.
```ruby
result = client.cyber_siara({
pageurl: "https://test.com",
master_url_id: "12333-3123123"
})
```

### DataDome
Метод решения DataDome вернет токен для обхода капчи.
Чтобы решить капчу DataDome вы должны обязательно использовать прокси.
```ruby
result = client.data_dome({
pageurl: "https://test.com",
captcha_url: "https://test.com/captcha/",
proxytype: "http",
proxy: "proxyuser:strongPassword@123.123.123.123:3128"
})
```

### MTCaptcha
Метод решения MTCaptcha. Он возвращает токен для обхода капчи.
```ruby
result = client.mt_captcha({
pageurl: "https://service.mtcaptcha.com/mtcv1/demo/index.html",
sitekey: "MTPublic-DemoKey9M"
})
```

## Другие методы

### send / get_result
Expand Down
12 changes: 12 additions & 0 deletions lib/api_2captcha/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,18 @@ def yandex(params)
solve("yandex", params)
end

def cyber_siara(params)
solve("cybersiara", params)
end

def data_dome(params)
solve("datadome", params)
end

def mt_captcha(params)
solve("mt_captcha", params)
end

private

def base_url
Expand Down