bestcaptchasolver
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -17,4 +17,2 @@ #!/usr/bin/node | ||
bestcaptchasolver.set_access_token(ACCESS_TOKEN); | ||
// using affiliate ID | ||
//bestcaptchasolverapi.set_affiliate_id('ID of affiliate from /account'); | ||
@@ -29,3 +27,4 @@ // balance | ||
b64image: captcha, | ||
//case_sensitive: true, | ||
//case_sensitive: true, // optional, defaults to false | ||
//affiliate_id: 'ID of affiliate' // optional | ||
}); | ||
@@ -41,7 +40,8 @@ }).then(function (id) { | ||
site_key: '6LfGJmcUAAAAALGtIb_FxC0LXm_GwOLyJAfbbUCN', | ||
//user_agent: 'Your user agent', | ||
//proxy: 'abc:def@12.35.56.78:4321 or 12.35.56.78:4321', | ||
//type: '1', // 1 - normal, 2 - invisible, 3 - v3 | ||
//v3_action: '', // v3 action | ||
//v3_min_score: '0.3', // if v3, score to target | ||
//user_agent: 'Your user agent', // optional | ||
//proxy: 'abc:def@12.35.56.78:4321 or 12.35.56.78:4321', // optional | ||
//type: '1', // 1 - normal, 2 - invisible, 3 - v3, optional and defaults to 1 | ||
//v3_action: '', // v3 action, optional | ||
//v3_min_score: '0.3', // if v3, score to target, optional | ||
//affiliate_id: 'ID of affiliate' // optional | ||
}); | ||
@@ -63,3 +63,3 @@ }).then(function (id) { | ||
}).catch(function (err) { | ||
log(err.message || err); | ||
log('Error: ' + err.message || err); | ||
}).then(function () { | ||
@@ -66,0 +66,0 @@ log('Example finished !'); |
@@ -1,3 +0,1 @@ | ||
const base64 = require('file-base64'); | ||
const fs = require('fs'); | ||
@@ -27,4 +25,3 @@ const Q = require('q'); | ||
// private variables | ||
var _access_token = undefined, _username = undefined, _password = undefined, | ||
_affiliate_id = undefined; | ||
var _access_token = undefined, _username = undefined, _password = undefined; | ||
@@ -40,10 +37,2 @@ /** | ||
/** | ||
* Set affiliate id | ||
* @param aff_id | ||
*/ | ||
exports.set_affiliate_id = function (aff_id) { | ||
_affiliate_id = aff_id; | ||
}; | ||
/** | ||
* Get account balance | ||
@@ -77,3 +66,2 @@ * @returns {Promise<any>} | ||
data.case_sensitive = opts.case_sensitive; | ||
if (_affiliate_id) data.affiliate_id = _affiliate_id; // add affiliate id, if present | ||
R.post(url, data).then(function (resp) { | ||
@@ -96,3 +84,2 @@ return deferred.resolve(resp.getBody().id); | ||
var url = BASE_URL + '/captcha/recaptcha'; | ||
if (_affiliate_id) data.affiliate_id = _affiliate_id; | ||
R.post(url, data).then(function (resp) { | ||
@@ -120,3 +107,2 @@ return deferred.resolve(resp.getBody().id); | ||
// still pending ? | ||
if (resp.error) return deferred.reject(new Error(resp.error)); | ||
if (resp.status === 'pending') return setTimeout(check_progress, 3000); // recheck in 3000 millis | ||
@@ -123,0 +109,0 @@ return deferred.resolve(resp); |
{ | ||
"name": "bestcaptchasolver", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "bestcaptchasolve-nodejs is a super easy to use bypass captcha nodeJS API wrapper for bestcaptchasolver.com captcha service ", | ||
@@ -29,3 +29,2 @@ "main": "index.js", | ||
"dependencies": { | ||
"file-base64": "^1.0.0", | ||
"q": "^1.5.1", | ||
@@ -32,0 +31,0 @@ "requestify": "^0.2.5" |
@@ -40,3 +40,4 @@ bestcaptchasolver - Bestcaptchasolver nodeJS client API library | ||
b64image: captcha, | ||
//case_sensitive: true, | ||
//case_sensitive: true, // optional defaults to false | ||
//affiliate_id: 'ID of affiliate' // optional | ||
}); | ||
@@ -53,7 +54,8 @@ ``` | ||
site_key: '6LfGJmcUAAAAALGtIb_FxC0LXm_GwOLyJAfbbUCN', | ||
//user_agent: 'Your user agent', | ||
//proxy: 'abc:def@12.35.56.78:4321 or 12.35.56.78:4321', | ||
//type: '1', // 1 - normal, 2 - invisible, 3 - v3 | ||
//v3_action: '', // v3 action | ||
//v3_min_score: '0.3', // if v3, score to target | ||
//user_agent: 'Your user agent', // optional | ||
//proxy: 'abc:def@12.35.56.78:4321 or 12.35.56.78:4321', // optional | ||
//type: '1', // 1 - normal, 2 - invisible, 3 - v3, optional and defaults to 1 | ||
//v3_action: '', // v3 action, optional | ||
//v3_min_score: '0.3', // if v3, score to target, optional | ||
//affiliate_id: 'ID of affiliate' // optional | ||
}); | ||
@@ -75,10 +77,8 @@ ``` | ||
The returned object also contains a `proxy_status` attribute, which will tell if any proxy was used in completion, and if not, why | ||
**If submitted with proxy, get proxy status** | ||
**Affiliate ID** | ||
```javascript | ||
bestcaptchasolver.set_affiliate_id('ID of affiliate from /account'); | ||
log('Recaptcha response: ' + data.gresponse); | ||
log('Proxy status: ' + data.proxy_status); | ||
``` | ||
**Set captcha bad** | ||
@@ -85,0 +85,0 @@ |
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
2
13905
176
- Removedfile-base64@^1.0.0
- Removedcore-util-is@1.0.3(transitive)
- Removedfile-base64@1.0.0(transitive)
- Removedfrom2@2.3.0(transitive)
- Removedinherits@2.0.4(transitive)
- Removedinto-stream@2.0.1(transitive)
- Removedisarray@1.0.0(transitive)
- Removedprocess-nextick-args@2.0.1(transitive)
- Removedreadable-stream@2.3.8(transitive)
- Removedsafe-buffer@5.1.2(transitive)
- Removedstring_decoder@1.1.1(transitive)
- Removedutil-deprecate@1.0.2(transitive)