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
Binary file added docs/captchas/images/tendi/aid-encrypted.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
63 changes: 60 additions & 3 deletions docs/captchas/tendi.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,19 @@ CapMonster Cloud по умолчанию работает через встро

---

<ParamItem title="aidEncrypted (внутри metadata)" type="string" />

Параметр содержит значение Aid, которое необходимо получить с целевого сайта перед созданием задачи.

Пример: `HHuVfL451oAYXSwVa87xnU4QHER9ufsPpaSomCugX5Il/Nc2vLTu2dgoguMwmhAM`

**Важно**: данный параметр используется не на всех сайтах. Если сайт не возвращает Aid, `aidEncrypted` передавать не нужно.
Значение `aidEncrypted` является **одноразовым**: для каждой новой задачи необходимо получать новый Aid.

Подробнее см. в разделе [Как получить aidEncrypted](#как-получить-aidencrypted).

---

<ParamItem title="userAgent" type="string" />
User-Agent браузера. Используйте текущее значение, поддерживаемое CapMonster Cloud: `userAgentPlaceholder`<br />

Expand Down Expand Up @@ -126,6 +139,8 @@ https://ru.api.capmonster.cloud/createTask
Подробнее в разделе [createTask](/docs/api/methods/create-task/).

:::
<br />
Если на сайте используется `aidEncrypted`, передавайте его в `metadata`. Для каждой новой задачи получайте новое значение с сайта.

<Tabs className="full-width-tabs filled-tabs request-tabs" groupId="captcha-type">

Expand All @@ -142,7 +157,7 @@ https://ru.api.capmonster.cloud/createTask
"websiteKey": "your-website-key",
"userAgent": "userAgentPlaceholder",
"metadata": {
"captchaUrl": "https://global.captcha.example.com/TCaptcha-global.js"
"captchaUrl": "https://example.com/TCaptcha.js"
}
}
}
Expand Down Expand Up @@ -171,7 +186,7 @@ https://ru.api.capmonster.cloud/createTask
"websiteKey": "your-website-key",
"userAgent": "userAgentPlaceholder",
"metadata": {
"captchaUrl": "https://global.captcha.example.com/TCaptcha-global.js"
"captchaUrl": "https://example.com/TCaptcha.js"
},
"proxyType": "your-proxy-type",
"proxyAddress": "your-proxy-address",
Expand Down Expand Up @@ -263,14 +278,56 @@ https://ru.api.capmonster.cloud/getTaskResult

`*` в имени файла означает произвольную или пустую строку. Например, шаблон `TJNCaptcha*.js` может соответствовать файлам `TJNCaptcha.js` или `TJNCaptcha-global.js`.

## Как получить aidEncrypted

Если на сайте используется Aid, получите его отдельным запросом перед созданием задачи и передайте полученное значение в параметре `aidEncrypted` внутри объекта `metadata`.

Откройте **Инструменты разработчика**, перейдите на вкладку **Network** и активируйте CAPTCHA. Найдите запрос, с помощью которого сайт получает Aid, и скопируйте значение из ответа.

Пример адреса запроса:

```text
https://example.com/path/GetCaptchaAid.ashx?_=1234567890000
```

В этом же запросе также может передаваться значение `websiteKey` (`AppId`).

![](./images/tendi/aid-encrypted.png)

Адрес запроса и формат ответа зависят от конкретного сайта.

Пример создания задачи с параметром `aidEncrypted`:

```json
{
"clientKey": "API_KEY",
"task": {
"type": "CustomTask",
"class": "TenDI",
"websiteURL": "https://example.com/page-with-captcha",
"websiteKey": "YOUR_WEBSITE_KEY",
"metadata": {
"captchaUrl": "https://example.com/TCaptcha.js",
"aidEncrypted": "YOUR_AID_ENCRYPTED"
}
}
}
```

:::warning Важно:

Получайте новое значение Aid перед созданием каждой задачи. Не используйте повторно значение `aidEncrypted`, полученное для предыдущей задачи, и не используйте значения из примеров документации.

:::


## Как найти все нужные параметры для создания задачи на решение

### Автоматически

Для автоматизации поиска параметров их можно извлекать через **браузер** (обычный или headless, например, с **Playwright**) или напрямую из **HTTP-запросов**. Поскольку значения динамических параметров действуют недолго, их рекомендуется использовать сразу после получения.

:::warning **Важно!**
:::warning **Важно:**
Приведённые фрагменты кода являются базовыми примерами для ознакомления в извлечении необходимых параметров. Точная реализация будет зависеть от вашего сайта с капчей, его структуры и используемых HTML-элементов и селекторов.
:::

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
64 changes: 61 additions & 3 deletions i18n/en/docusaurus-plugin-content-docs/current/captchas/tendi.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,19 @@ If you are using a proxy with IP authorization, make sure to whitelist the addre

---

<ParamItem title="aidEncrypted (inside metadata)" type="string" />

This parameter contains the Aid value, which must be obtained from the target website before creating a task.

Example: `HHuVfL451oAYXSwVa87xnU4QHER9ufsPpaSomCugX5Il/Nc2vLTu2dgoguMwmhAM`

**Important**: this parameter is not used on all websites. If the website does not return Aid, you do not need to pass `aidEncrypted`.
The `aidEncrypted` value is **single-use**: a new Aid must be obtained for each new task.

For details, see [How to get aidEncrypted](#how-to-get-aidencrypted).

---

<ParamItem title="userAgent" type="string" />
Browser User-Agent. Use the current value supported by CapMonster Cloud: `userAgentPlaceholder`<br />

Expand Down Expand Up @@ -100,6 +113,8 @@ You can get the latest value at: [https://capmonster.cloud/api/useragent/actual]
</div>

## Create task method
If the website uses `aidEncrypted`, pass it in `metadata`. Obtain a new value from the website for each new task.

<Tabs className="full-width-tabs filled-tabs request-tabs" groupId="captcha-type">

<TabItem value="proxyless" label="CustomTask (without proxy)" default className="method-panel">
Expand All @@ -120,7 +135,7 @@ You can get the latest value at: [https://capmonster.cloud/api/useragent/actual]
"websiteKey": "your-website-key",
"userAgent": "userAgentPlaceholder",
"metadata": {
"captchaUrl": "https://global.captcha.example.com/TCaptcha-global.js"
"captchaUrl": "https://example.com/TCaptcha.js"
}
}
}
Expand Down Expand Up @@ -154,7 +169,7 @@ You can get the latest value at: [https://capmonster.cloud/api/useragent/actual]
"websiteKey": "your-website-key",
"userAgent": "userAgentPlaceholder",
"metadata": {
"captchaUrl": "https://global.captcha.example.com/TCaptcha-global.js"
"captchaUrl": "https://example.com/TCaptcha.js"
},
"proxyType": "your-proxy-type",
"proxyAddress": "your-proxy-address",
Expand Down Expand Up @@ -228,13 +243,56 @@ For the second version, files named `TJNCaptcha*.js` and `TJCaptcha*.js` may als

`*` in the filename represents any string or an empty string. For example, the pattern `TJNCaptcha*.js` can match files such as `TJNCaptcha.js` or `TJNCaptcha-global.js`.

## How to get aidEncrypted

If the website uses Aid, obtain it with a separate request before creating a task and pass the returned value in the `aidEncrypted` parameter inside the `metadata` object.

Open **Developer Tools**, go to the **Network** tab, and trigger the CAPTCHA. Find the request the website uses to obtain Aid and copy the value from the response.

Example request URL:

```text
https://example.com/path/GetCaptchaAid.ashx?_=1234567890000
```

The same request may also include the `websiteKey` (`AppId`) value.

![](./images/tendi/aid-encrypted.png)

The request URL and response format depend on the website.

Example of creating a task with the `aidEncrypted` parameter:

```json
{
"clientKey": "API_KEY",
"task": {
"type": "CustomTask",
"class": "TenDI",
"websiteURL": "https://example.com/page-with-captcha",
"websiteKey": "YOUR_WEBSITE_KEY",
"metadata": {
"captchaUrl": "https://example.com/TCaptcha.js",
"aidEncrypted": "YOUR_AID_ENCRYPTED"
}
}
}
```

:::warning Important:

Obtain a new Aid value before creating each task. Do not reuse an `aidEncrypted` value obtained for a previous task, and do not use values from the documentation examples.

:::


## How to find all required parameters for task creation

### Automatically

To automate parameter extraction, you can retrieve them via a **browser** (regular or headless, e.g., using **Playwright**) or directly from **HTTP requests**. Since dynamic parameter values are short-lived, it is recommended to use them immediately after retrieval.

:::warning **Important!**
:::warning **Important:**
The provided code snippets are basic examples for learning how to extract the required parameters. The exact implementation will depend on your captcha page, its structure, and the HTML elements and selectors used.
:::

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,20 @@ Se o proxy utiliza autenticação por IP, é necessário adicionar o endereço *

---

<ParamItem title="aidEncrypted (dentro da metadata)" type="string" />

Este parâmetro contém o valor de Aid, que deve ser obtido no site de destino antes de criar a tarefa.

Exemplo: `HHuVfL451oAYXSwVa87xnU4QHER9ufsPpaSomCugX5Il/Nc2vLTu2dgoguMwmhAM`

**Importante**: este parâmetro não é utilizado em todos os sites. Se o site não retornar Aid, não é necessário enviar `aidEncrypted`.

O valor de `aidEncrypted` é de **uso único**: é necessário obter um novo Aid para cada nova tarefa.

Para mais detalhes, consulte [Como obter aidEncrypted](#como-obter-aidencrypted).

---

<ParamItem title="userAgent" type="string" />
Use o valor atual compatível com o CapMonster Cloud: `userAgentPlaceholder`<br />

Expand Down Expand Up @@ -102,6 +116,8 @@ Senha do servidor proxy.

## Método de criação da tarefa

Se o site utilizar `aidEncrypted`, envie-o dentro de `metadata`. Obtenha um novo valor no site para cada nova tarefa.

<Tabs className="full-width-tabs filled-tabs request-tabs" groupId="captcha-type">

<TabItem value="proxyless" label="Custom task (sem proxy)" default className="method-panel">
Expand All @@ -122,7 +138,7 @@ Senha do servidor proxy.
"websiteKey": "your-website-key",
"userAgent": "userAgentPlaceholder",
"metadata": {
"captchaUrl": "https://global.captcha.example.com/TCaptcha-global.js"
"captchaUrl": "https://example.com/TCaptcha.js"
}
}
}
Expand Down Expand Up @@ -156,7 +172,7 @@ Senha do servidor proxy.
"websiteKey": "your-website-key",
"userAgent": "userAgentPlaceholder",
"metadata": {
"captchaUrl": "https://global.captcha.example.com/TCaptcha-global.js"
"captchaUrl": "https://example.com/TCaptcha.js"
},
"proxyType": "your-proxy-type",
"proxyAddress": "your-proxy-address",
Expand Down Expand Up @@ -230,13 +246,55 @@ Para a segunda versão, também podem ser usados arquivos chamados `TJNCaptcha*.

O caractere `*` no nome do arquivo representa qualquer sequência de caracteres ou uma sequência vazia. Por exemplo, o padrão `TJNCaptcha*.js` pode corresponder aos arquivos `TJNCaptcha.js` ou `TJNCaptcha-global.js`.

## Como obter aidEncrypted

Se o site utilizar Aid, obtenha-o por meio de uma requisição separada antes de criar a tarefa e envie o valor retornado no parâmetro `aidEncrypted` dentro do objeto `metadata`.

Abra as **Ferramentas de Desenvolvedor**, vá para a aba **Network** e ative o CAPTCHA. Encontre a requisição que o site utiliza para obter Aid e copie o valor da resposta.

Exemplo de URL da requisição:

```text
https://example.com/path/GetCaptchaAid.ashx?_=1234567890000
```

Essa mesma requisição também pode incluir o valor de `websiteKey` (`AppId`).

![](./images/tendi/aid-encrypted.png)

A URL da requisição e o formato da resposta dependem do site.

Exemplo de criação de uma tarefa com o parâmetro `aidEncrypted`:

```json
{
"clientKey": "API_KEY",
"task": {
"type": "CustomTask",
"class": "TenDI",
"websiteURL": "https://example.com/page-with-captcha",
"websiteKey": "YOUR_WEBSITE_KEY",
"metadata": {
"captchaUrl": "https://example.com/TCaptcha.js",
"aidEncrypted": "YOUR_AID_ENCRYPTED"
}
}
}
```

:::warning Importante:

Obtenha um novo valor de Aid antes de criar cada tarefa. Não reutilize um valor de `aidEncrypted` obtido para uma tarefa anterior e não utilize os valores dos exemplos da documentação.

:::

## Como Encontrar Todos os Parâmetros Necessários para a Criação da Tarefa

### Automaticamente

Para automatizar a extração dos parâmetros, eles podem ser obtidos via **navegador** (normal ou headless, por exemplo, usando **Playwright**) ou diretamente a partir de **requisições HTTP**. Como os valores dos parâmetros dinâmicos têm curta duração, recomenda-se utilizá-los imediatamente após a extração.

:::warning **Importante!**
:::warning **Importante:**
Os trechos de código fornecidos são exemplos básicos para aprendizado sobre como extrair os parâmetros necessários. A implementação exata dependerá do seu site com captcha, sua estrutura e os elementos HTML e seletores utilizados.
:::

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading