2captcha-node 中文文档教程
Welcome to 2captcha-node ????
使用 2captcha 解决图像验证码的 NodeJS 包装器
Prerequisites:
您将需要一个 2Captcha API 密钥
Install
npm install 2captcha-node
or
yarn add 2captcha-node
Usage
设置您的 api 密钥:
import captchaSolver from '2captcha-node';
const captcha = captchaSolver('your-api-key');
它将返回一个带有 solve
函数的对象,然后您你将能够在你的脚本中使用它
const options = {
image: 'base64-image',
maxAttempts: 60, // Optional
};
const { id, text } = await captcha.solve(options);
并且这个已解决的验证码将返回对象,带有验证码 ID 和验证码文本
你也可以使用 balance
函数,查看你在 2Captcha 的余额
const balance = await captcha.balance();
你可以使用 Report Captcha是否有效。
await captcha.report(id, isValid);
Author
??? Pedro Filho pedro@filho.me
- Twitter: @pedrofilhome
- Github: @pedroapfilho
Contributing
欢迎贡献、问题和功能请求!
随时检查 问题页面。
Show your support
如果这个项目对你有帮助,请给一个⭐️!
Welcome to 2captcha-node ????
A NodeJS wrapper to solve image captchas with 2captcha
Prerequisites:
You will need a 2Captcha API key
Install
npm install 2captcha-node
or
yarn add 2captcha-node
Usage
Set up your api key:
import captchaSolver from '2captcha-node';
const captcha = captchaSolver('your-api-key');
It'll return an object with the solve
function, and you'll be able to use it inside of your script
const options = {
image: 'base64-image',
maxAttempts: 60, // Optional
};
const { id, text } = await captcha.solve(options);
And this solvedCaptcha will return object, with captcha id and captcha text
You can use the balance
function too, to see your balance at 2Captcha
const balance = await captcha.balance();
You can use the Report Captcha is valid or not.
await captcha.report(id, isValid);
Author
???? Pedro Filho pedro@filho.me
- Twitter: @pedrofilhome
- Github: @pedroapfilho
???? Contributing
Contributions, issues and feature requests are welcome!
Feel free to check issues page.
Show your support
Give a ⭐️ if this project helped you!