Current collected state Current
Observed since 20 Oct, 19:09 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
2captcha-rucaptcha
Simple 2captcha and rucaptcha API wrapper for Node.js
The package is written in TypeScript and currently only supports base64 images.
NPM:
npm i 2captcha-rucaptcha --save
Yarn:
yarn add 2captcha-rucaptcha
All examples are on the github.
const { Captcha } = require("2captcha-rucaptcha");
const fs = require("fs");
const captcha = new Captcha({
type: 1,
key: "<YOUR_API_KEY>"
});
const base64 = fs.readFileSync("base64.txt", "utf-8");
captcha
.solve({ method: "base64", body: base64 })
.then(result => {
console.log(result);
})
.catch(e => {
console.log(e);
});
const { Captcha } = require("2captcha-rucaptcha");
const fs = require("fs");
const captcha = new Captcha({
type: 2,
key: "<YOUR_API_KEY>"
});
const base64 = fs.readFileSync("base64.txt", "utf-8");
captcha
.solve({ method: "base64", body: base64 })
.then(result => {
console.log(result);
})
.catch(e => {
console.log(e);
});
| Name | Required | Description |
|---|---|---|
| type | + | 1 - rucaptcha 2 - 2captcha |
| key | + | Your API key |
| delay | - | Delay before receiving a captcha recognition response in seconds Default - 3s |
| Name | Required | Description |
|---|---|---|
| method | + | post (multipart form) or base64 (image base64 encode) |
| phrase | - | 0 - captcha contains one word 1 - captcha contains two or more words |
| regsense | - | 0 - captcha in not case sensitive 1 - captcha is case sensitive |
| numeric | - | 0 - not specified 1 - captcha contains only numbers 2 - captcha contains only letters 3 - captcha contains only numbers OR only letters 4 - captcha contains both numbers AND letters |
| calc | - | 0 - not specified 1 - captcha requires calculation (e.g. type the result 4 + 8 = ) |
| min_len | - | 0 - not specified 1..20 - minimal number of symbols in captcha |
| max_len | - | 0 - not specified 1..20 - maximal number of symbols in captcha |
| language | - | 0 - not specified 1 - Cyrillic captcha 2 - Latin captcha. |
| lang | - | ru, en and etc. |
| textinstructions | - | Text will be shown to worker to help him to solve the captcha correctly. |
| imginstructions | - | BASE64 Image will be shown to worker to help him to solve the captcha correctly. |
| pingback | - | URL for pingback (callback) response that will be sent when captcha is solved. URL should be registered on the server. |
| header_acao | - | 0 - disabled 1 - enabled. If enabled in.php will include Access-Control-Allow-Origin:* header in the response. Used for cross-domain AJAX requests in web applications. |
| softId | - | ID of software developer |
To report a failed or successful captcha solution, you need to use the following methods:
bad(id)
good(id)
solution = await captcha.solve({ method: "base64", body: base64, lang: "en", numeric: 1 });
if (ok) captcha.good(captcha.id);
else captcha.bad(captcha.id);
Passed to the solve() along with the options above.
| Name | Description |
|---|---|
| proxy | Format for IP authentication: IP_address:PORT Example: proxy=123.123.123.123:3128 Format for login/password authentication: login:password@IP_address:PORT Example: proxy=proxyuser:strongPassword@123.123.123.123:3128 |
| proxytype | Type of your proxy: HTTP, HTTPS, SOCKS4, SOCKS5. |
Download counts and popularity will appear here as the collector receives them.
| Package / target | Requirement | Relationship |
|---|---|---|
axiosEnvironment{
"local_name": "axios",
"alias": false,
"peer_metadata": null
} | ^0.19.0 | runtime |
delayEnvironment{
"local_name": "delay",
"alias": false,
"peer_metadata": null
} | ^4.3.0 | runtime |
@types/nodeEnvironment{
"local_name": "@types/node",
"alias": false,
"peer_metadata": null
} | ^12.7.8 | development |
ts-nodeEnvironment{
"local_name": "ts-node",
"alias": false,
"peer_metadata": null
} | ^8.4.1 | development |
tslintEnvironment{
"local_name": "tslint",
"alias": false,
"peer_metadata": null
} | ^5.20.0 | development |
tslint-config-airbnbEnvironment{
"local_name": "tslint-config-airbnb",
"alias": false,
"peer_metadata": null
} | ^5.11.2 | development |
typescriptEnvironment{
"local_name": "typescript",
"alias": false,
"peer_metadata": null
} | ^3.6.3 | development |
Source distribution
{
"integrity": "sha512-I+gl3h4nRB/2i+fV9wlYXaiR1atVH5dnrWIL8V4eXs9KpSiwJgukf+z9axiLz8crEjut0JsH3llDJ7LhiSD2XA==",
"shasum": "6e740d25982350a609daa60b2b6097776486d495",
"tarball": "https://registry.npmjs.org/2captcha-rucaptcha/-/2captcha-rucaptcha-1.0.1.tgz",
"fileCount": 18,
"unpackedSize": 70662,
"npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdlPTwCRA9TVsSAnZWagAARccP/iyBmucfUuvB3lluZVRc\njdb+EXBEgTV6GPh8lBsGQNuRhAV7Y9/qfT6xsMnCVvl68+R6plG5iTroebZz\nx2fNS3/qIL8Be+MIDy8RRHoparekxv6pTxthtMlq83x9RhVvwgDDZEfXdPjp\n1mHivRFS6s4GXk5HGsqJXpr9t8RPq1n22DxMVzEHFKcT+6+G5HC6EuxJVIIx\nstbvM+SoMKabDsmituBU9a1ANr0yEg5HUf2s+rrdi56Xj3O7lbcIP43vTSFm\n78YWSK4pnsV7THzVggFSKmo84HILMtSBksYZvEsjGrzGtoa3nXqgU8941gIv\nOxfc5zxp34H5F63HYd3F1XUW1gmeo8fb9yasttQ/ffWDg8Vw2qWssBU3iNTE\nsBQHZqz1YwMhVaL0BUemeEodSgc9nXXjtI1mpGCfY+7I9/QLzRUyOCr04XJt\nnyQjsrLmRm4Zv8x/iOHcUPscqtPa59UAA8Arrjdmcjktxo0kauf8y+NIrpir\nycZ5XXmbDjscUsalWOJYTtW3D2LpWytOzbhZ6WItJE1BU74F7KHabL3y9kmI\nqCHlq2TD+FFHHe6p3q8vDRbQLPvoJisM6krhyq2Lgb9WlRhpgfHAAPsvE2KC\nW4OYNWb9Sq/mVgJF30rsUlQLL+XN4jVia/LK6+Dyil++kL/uY34CQ358kBCc\ncS1J\r\n=6RM8\r\n-----END PGP SIGNATURE-----\r\n",
"signatures": [
{
"keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
"sig": "MEYCIQCCnCbuIpm/DGOiGZkMaOaHCtlXDhstt6Bi0JgOhT32xwIhAM1PiB6b3u/CHiyGCLI4j72WUsE3FNzYyyxWKv4yVR08"
}
]
}Shared repository data · GitHub
Observed since 20 Oct, 19:09 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package_version:823f19c854ab5c9afba4ac0be01cf5d4bfce7469acacff33f6cd4ec0b26ce226