diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index ebc2119..b0a1e7b 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -35,6 +35,6 @@ jobs: run: npm run release - name: Publish to npm - run: npm publish --access public + run: npm publish --access public --provenance env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} \ No newline at end of file diff --git a/README.md b/README.md index 628efe8..37b1a48 100644 --- a/README.md +++ b/README.md @@ -1,48 +1,97 @@ -## Resources & Documentation - -- **Official Documentation**: [CapMonster Cloud Docs](https://docs.capmonster.cloud/) — Full API reference and guide. -- **n8n Community Nodes**: [Official n8n Guide](https://n8n.io) for installing and managing community nodes. - -## How to use - -1. **Add Node**: Search for **CapMonster Cloud** in your n8n workflow. - -![img_4.png](images/img_4.png) - -2. **Get your API Key**: Copy it from your [CapMonster Cloud Dashboard](https://dash.capmonster.cloud). - -![img_1.png](images/img_1.png) - -3. **Add Api Key to node**: -![img.png](images/keyNode.png) -4. Select Task Type: - -![selectCaptcha1.png](images/selectCaptcha1.png) - -- Use the Task Type dropdown to choose the kind of captcha you want to solve: - - JSON (Custom Task) – supply any valid CapMonster task JSON. - - Recaptcha V2 / V2 Enterprise / V2 Proxy - - Recaptcha V3 / V3 Enterprise - - Image to Text - - GeeTest - - Cloudflare Turnstile (token, managed challenge, waiting room) - - Complex Image Tasks (click, recognition) - - DataDome, Basilisk, TenDI, Amazon (multiple variants), Binance, Imperva, Prosopo, Temu, Yidun, MTCaptcha, Altcha, FunCaptcha, Castle, TSPD, Hunt - - Some task types support optional proxy settings. - ![selectCaptchaWithProxy.png](images/selectCaptchaWithProxy.png) - -5. **Customize Payload**: - - For JSON tasks, supply a full CapMonster JSON object without clientKey. - - For built-in task types, fill the provided fields (e.g., websiteURL, websiteKey, userAgent, metadata). - - If the task supports proxies, enable Use Proxy and fill the proxy details.![img_2.png](images/img_2.png) - - - Find the exact JSON structure in the [Official Task Documentation](https://docs.capmonster.cloud/docs/captchas/). - ```json - { - "type":"RecaptchaV2Task", - "websiteURL":"https://lessons.zennolab.com/captchas/recaptcha/v2_simple.php?level=high", - "websiteKey":"6Lcg7CMUAAAAANphynKgn9YAgA4tQ2KI_iqRyTwd" - } - ``` -6. **Execution**: The node will automatically: - - Return the solution (token) once it's ready. +# n8n-nodes-capmonstercloud + +CapMonster Cloud community node for n8n. +Use this node to solve supported CAPTCHA challenges through the CapMonster Cloud API. + +## Requirements + +- n8n with community nodes enabled +- A CapMonster Cloud account +- A valid CapMonster Cloud API key + +## Installation + +Install the package as a community node in n8n: + +```bash +npm install @zennolab_com/n8n-nodes-capmonstercloud +``` + +You can also install it from the n8n Community Nodes UI. + +## Credentials + +This node uses one credential: + +- **CapMonster Cloud API** + - `Client Key`: your API key from [CapMonster Cloud Dashboard](https://dash.capmonster.cloud) + +## Supported operations + +The node provides multiple task types, including: + +- JSON (custom task payload) +- Recaptcha V2 and Recaptcha V2 Enterprise +- Recaptcha V3 and Recaptcha V3 Enterprise +- GeeTest V3 and GeeTest V4 +- Cloudflare Turnstile (token, managed challenge, waiting room) +- Image to Text +- Complex image tasks (click and recognition) +- Additional task types such as DataDome, Basilisk, TenDI, Amazon variants, Binance, Imperva, Prosopo, Temu, Yidun, MTCaptcha, Altcha, FunCaptcha, Castle, TSPD, and Hunt + +Some task types support optional proxy parameters. + +## Usage + +1. Add **CapMonster Cloud** node to your workflow. +2. Select or create **CapMonster Cloud API** credentials. +3. Choose a task type in **Task Type**. +4. Fill required fields for the selected task. +5. Execute the node. + +The node creates a task, polls CapMonster Cloud until completion, and returns the solution in the node output. + +## JSON task example + +When using the JSON operation, provide a valid CapMonster task object without `clientKey`: + +```json +{ + "type": "RecaptchaV2Task", + "websiteURL": "https://lessons.zennolab.com/captchas/recaptcha/v2_simple.php?level=high", + "websiteKey": "6Lcg7CMUAAAAANphynKgn9YAgA4tQ2KI_iqRyTwd" +} +``` + +## Output + +The node returns the solved task response from CapMonster Cloud, including solution fields for the selected task type. + +## Troubleshooting + +- Verify your API key is valid and active. +- Confirm all required fields for the selected task type are provided. +- For JSON tasks, ensure the payload is valid JSON and matches the API schema. +- If a task requires proxy data, provide a working proxy host, port, and protocol. + +## Optional UI examples + +You can use the screenshots below as a quick visual reference for node setup in n8n. + +### Node and task type selection + +![CapMonster Cloud node setup](images/selectCaptcha1.png) + +### Credentials configuration + +![CapMonster Cloud credentials](images/keyNode.png) + +## Documentation + +- [CapMonster Cloud Documentation](https://docs.capmonster.cloud/) +- [CapMonster CAPTCHA task reference](https://docs.capmonster.cloud/docs/captchas/) +- [n8n Community Nodes Guide](https://docs.n8n.io/integrations/community-nodes/) + +## License + +[MIT](LICENSE) diff --git a/nodes/CapmonsterCloud/captchas/complexImageRecognition.ts b/nodes/CapmonsterCloud/captchas/complexImageRecognition.ts index 26b7d65..a8b867f 100644 --- a/nodes/CapmonsterCloud/captchas/complexImageRecognition.ts +++ b/nodes/CapmonsterCloud/captchas/complexImageRecognition.ts @@ -46,7 +46,7 @@ export const buildComplexImageRecognition = function ( try { metadata = JSON.parse(metadataRaw); } catch { - throw new Error('metadata должен быть валидным JSON'); + throw new Error('Metadata should be valid JSON'); } return { diff --git a/nodes/CapmonsterCloud/captchas/geetestV3.ts b/nodes/CapmonsterCloud/captchas/geetestV3.ts index 3a5431e..2602c5f 100644 --- a/nodes/CapmonsterCloud/captchas/geetestV3.ts +++ b/nodes/CapmonsterCloud/captchas/geetestV3.ts @@ -27,7 +27,7 @@ export const geeTestV3Fields: INodeProperties[] = [ required: true, displayOptions: { show: { operation: ['geeTestV3'] } }, default: '', - description: 'Dynamic challenge ключ (обновляется каждый раз)', + description: 'Dynamic challenge key (changes on each request)', }, { displayName: 'Geetest API Subdomain', @@ -35,7 +35,7 @@ export const geeTestV3Fields: INodeProperties[] = [ type: 'string', displayOptions: { show: { operation: ['geeTestV3'] } }, default: '', - description: 'Custom Geetest API subdomain (не api.geetest.com)', + description: 'Custom Geetest API subdomain (not api.geetest.com)', }, { @@ -45,7 +45,7 @@ export const geeTestV3Fields: INodeProperties[] = [ typeOptions: { editor: 'codeNodeEditor', rows: 3 }, displayOptions: { show: { operation: ['geeTestV3'] } }, default: '', - description: 'JSON string с параметрами загрузки скрипта', + description: 'JSON string with script loading parameters', }, { diff --git a/nodes/CapmonsterCloud/captchas/recaptchaClick.ts b/nodes/CapmonsterCloud/captchas/recaptchaClick.ts index dbc4b72..f80a4fb 100644 --- a/nodes/CapmonsterCloud/captchas/recaptchaClick.ts +++ b/nodes/CapmonsterCloud/captchas/recaptchaClick.ts @@ -43,7 +43,7 @@ export const recaptchaClick: INodeProperties[] = [ type: 'string', displayOptions: { show: { operation: ['recaptchaClick'] } }, default: defaultUserAgent, - description: 'User-Agent для запроса к сайту', + description: 'User-Agent used for requests to the target website', }, ]; diff --git a/nodes/CapmonsterCloud/proxy/index.ts b/nodes/CapmonsterCloud/proxy/index.ts index 47e0276..1d1f608 100644 --- a/nodes/CapmonsterCloud/proxy/index.ts +++ b/nodes/CapmonsterCloud/proxy/index.ts @@ -71,7 +71,7 @@ export const proxyFields: INodeProperties[] = [ operation: taskTypes, }, }, - description: 'IP/hostname proxy. Example: 1.2.3.4 или proxy.example.com.', + description: 'Proxy IP/hostname. Example: 1.2.3.4 or proxy.example.com.', }, { displayName: 'Proxy Port',