capsolver-npm
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -5,5 +5,4 @@ const CapSolver = require('../src/CapSolver'); | ||
(async function() { | ||
await handler.antiturnstile( | ||
'https://website.com/', | ||
'sitekey', | ||
await handler.anticloudflare( | ||
'https://minecraftpocket-servers.com/login/', | ||
{'proxy': 'proxy.provider.io:23331:user1:password1'}, | ||
@@ -10,0 +9,0 @@ {'type':'challenge'} |
@@ -6,7 +6,7 @@ const CapSolver = require('../src/CapSolver'); | ||
await handler.antiturnstile( | ||
'https://website.com/', | ||
'sitekey', | ||
{'proxy': 'proxy.provider.io:23331:user1:password1'}, | ||
{'type':'turnstile'} | ||
'https://peet.ws/turnstile-test/non-interactive.html', | ||
'0x4AAAAAAABS7vwvV6VFfMcD', | ||
{ proxy: 'proxy.provider.io:23331:user1:password1' }, | ||
{ type: 'turnstile', action: 'login', cdata: '0000-1111-2222-3333-example-cdata' } | ||
).then((captcha) => { if(captcha.error !== 0){ console.log(captcha.apiResponse) }else{ console.log(captcha.solution) } }) | ||
})(); |
module.exports = { | ||
apps: [ | ||
{ name: "1", script: "../recaptchav3.js" }, | ||
{ name: "2", script: "../recaptchav3.js" }, | ||
{ name: "3", script: "../recaptchav3.js" }, | ||
{ name: "4", script: "../recaptchav3.js" }, | ||
{ name: "5", script: "../recaptchav3.js" }, | ||
{ name: "6", script: "../recaptchav3.js" }, | ||
{ name: "7", script: "../recaptchav3.js" }, | ||
{ name: "8", script: "../recaptchav3.js" }, | ||
{ name: "9", script: "../recaptchav3.js" }, | ||
{ name: "1", script: "../antiturnstile.js" }, | ||
{ name: "2", script: "../antiturnstile.js" }, | ||
{ name: "3", script: "../antiturnstile.js" }, | ||
{ name: "4", script: "../antiturnstile.js" }, | ||
{ name: "5", script: "../antiturnstile.js" }, | ||
{ name: "6", script: "../antiturnstile.js" }, | ||
{ name: "7", script: "../antiturnstile.js" }, | ||
{ name: "8", script: "../antiturnstile.js" }, | ||
{ name: "9", script: "../antiturnstile.js" }, | ||
] | ||
} |
@@ -7,3 +7,4 @@ PM2 Benchmark | ||
1. Install pm2 globally: `npm install -g pm2`. | ||
3. Set [pm2 config file](https://github.com/0qwertyy/capsolver-npm/blob/master/examples/ecosystem.config.js) as your preference. | ||
2. Set [pm2 config file](https://github.com/0qwertyy/capsolver-npm/blob/master/examples/ecosystem.config.js) as your preference. | ||
3. Navigate to `./node_modules/capsolver-npm/examples/pm2/`. | ||
4. Control processes: `pm2 start ecosystem.config.js` & `pm2 delete all`. | ||
@@ -14,28 +15,2 @@ 5. Print logs for all process: `pm2 logs`. | ||
π More task examples | ||
- | ||
```javascript | ||
const CapSolver = require('capsolver-npm'); | ||
const handler = new CapSolver('apikey'); | ||
const taskData = | ||
{ type : 'HCaptchaTaskProxyless', websiteURL : 'https://website.com/', websiteKey : '000000-00000-000000-000000000' } | ||
await handler.runAnyTask(taskData).then(response => { console.log(response); }); | ||
``` | ||
```javascript | ||
import CapSolver from 'capsolver-npm'; // import as ES6 module | ||
const apikey = 'CAI-XXX...'; | ||
const handler = new CapSolver(apikey); | ||
// *proxyType parameter supports for: http, https, socks4, socks5 | ||
await handler.recaptchav3( | ||
'https://websiteurl.com/', | ||
'0000000000000_0000000', | ||
{ 'proxyType': 'http', 'proxyAddress': 'ip_address', 'proxyPort': 3221, 'proxyLogin': 'username', 'proxyPassword': 'password' }, | ||
'sign_in' // pageAction argument required in recaptchav3 | ||
).then(response => { console.log(response); }) | ||
``` | ||
[*Building fast test-project with capsolver-npm](https://www.youtube.com/watch?v=s9OyE_pBPyE) | ||
[*Building fast test-project with capsolver-npm](https://www.youtube.com/watch?v=s9OyE_pBPyE) |
{ | ||
"name": "capsolver-npm", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "src/CapSolver.js", |
@@ -6,7 +6,6 @@ # capsolver.com api wrapperπ§ | ||
now binded: *π₯ AntiTurnstile. π₯ AntiCloudflare. π₯ Geetest V4.* | ||
[![](https://img.shields.io/badge/1.0.1-capsolver--npm-blue?logo=npm&logoColor=white)](https://www.npmjs.com/package/capsolver-npm) | ||
[![](https://img.shields.io/badge/documentation-docs.capsolver.com-blue)](https://docs.capsolver.com/guide/getting-started.html) | ||
[![](https://img.shields.io/badge/1.0.2-capsolver--npm-darkgreen?logo=npm&logoColor=white)](https://www.npmjs.com/package/capsolver-npm) | ||
[![](https://img.shields.io/badge/documentation-docs.capsolver.com-darkgreen)](https://docs.capsolver.com/guide/getting-started.html) | ||
@@ -23,3 +22,3 @@ β¬οΈ Install | ||
```javascript | ||
const CapSolver = require('capsolver-npm'); | ||
const CapSolver = require("capsolver-npm"); | ||
``` | ||
@@ -36,3 +35,3 @@ 2. Define tasks handler (singleton). | ||
**1οΈβ£ task-bind methods** (handle task results in one step) | ||
**1οΈβ£ task methods** (handle task results in one step) | ||
@@ -42,10 +41,10 @@ *example: check capsolver.com balance + run for one hcaptcha token (`.hcaptchaproxyless()`):* | ||
```javascript | ||
const CapSolver = require('capsolver-npm'); | ||
const handler = new CapSolver('apikey', 1); // verbose level 1 | ||
const CapSolver = require("capsolver-npm"); | ||
const handler = new CapSolver("CAI-XXXX ...", 1); // verbose level 1 | ||
let b = await handler.balance(); | ||
if(b > 0){ // usd balance | ||
await handler.hcaptchaproxyless('https://websiteurl.com/', '000000-000000000-0000000') | ||
await handler.hcaptchaproxyless("https://websiteurl.com/", "000000-000000000-0000000") | ||
.then(async response => { | ||
if(response.error === 0){ console.log(response.solution) } | ||
else{ console.log('error ' + JSON.stringify(response.apiResponse)) } | ||
else{ console.log("error " + JSON.stringify(response.apiResponse)) } | ||
}); | ||
@@ -62,3 +61,3 @@ } | ||
const CapSolver = require("capsolver-npm"); | ||
const handler = new CapSolver("apikey"); | ||
const handler = new CapSolver("CAI-XXXX ..."); | ||
const taskData = // build a task | ||
@@ -131,6 +130,6 @@ { | ||
| Method | Returns | | ||
|:-------------------------------------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ||
| `await handler.balance()` | get balance as float number | | ||
| `await handler.runAnyTask(taskData)` | CapSolver API response | | ||
| Method | Returns | | ||
|:-------------------------------------|:-------------------------------| | ||
| `await handler.balance()` | get balance as float number | | ||
| `await handler.runAnyTask(taskData)` | not use a specific task method | | ||
@@ -158,5 +157,13 @@ Custom proxy usage (proxyInfo schema): | ||
task-bin methods: | ||
task-bind methods: | ||
- | ||
βοΈ **Cloudflare** | ||
```javascript | ||
// * check required parameters for a website with API docs. | ||
await handler.anticloudflare(websiteURL, proxyInfo, metadata, html) | ||
await handler.antiturnstile(websiteURL, websiteKey, proxyInfo, metadata) | ||
``` | ||
βοΈ **HCaptcha** | ||
@@ -168,3 +175,2 @@ | ||
```javascript | ||
// * check required parameters for a website with API docs. | ||
await handler.hcaptcha(websiteURL, websiteKey, proxyInfo, userAgent, isInvisible, enterprisePayload) | ||
@@ -171,0 +177,0 @@ await handler.hcaptchaproxyless(websiteURL, websiteKey, userAgent, isInvisible, enterprisePayload) |
@@ -5,3 +5,3 @@ const Tasker = require("./Tasker"); | ||
/** | ||
* CapSolver.io Tasks Handler | ||
* CapSolver.com Tasks Handler | ||
*/ | ||
@@ -73,3 +73,3 @@ class CapSolver { | ||
/** Fast-bind methods **/ | ||
/** Task methods **/ | ||
@@ -76,0 +76,0 @@ /** mtcaptcha **/ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
248
0
95708
967