Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Utility should stop when 2captcha balance starts reporting $0 #61

Open
tomballgithub opened this issue Jul 4, 2017 · 4 comments
Open

Comments

@tomballgithub
Copy link

Saw this yesterday when balance ran out. It just does this infinitely although that doesn't really harm anything. It really should exit gracefully

07-03 23:43:10 [2captcha] KO response when sending IN 2captcha : {"status":0,"request":"ERROR_ZERO_BALANCE"}
07-03 23:43:10 [2captcha] Request new Captcha
07-03 23:43:11 [2captcha] KO response when sending IN 2captcha : {"status":0,"request":"ERROR_ZERO_BALANCE"}
07-03 23:43:11 [2captcha] Request new Captcha
07-03 23:43:11 [2captcha] KO response when sending IN 2captcha : {"status":0,"request":"ERROR_ZERO_BALANCE"}
07-03 23:43:11 [2captcha] Request new Captcha
07-03 23:43:11 [2captcha] KO response when sending IN 2captcha : {"status":0,"request":"ERROR_ZERO_BALANCE"}
07-03 23:43:11 [2captcha] Request new Captcha
07-03 23:43:11 [2captcha] KO response when sending IN 2captcha : {"status":0,"request":"ERROR_ZERO_BALANCE"}
07-03 23:43:11 [2captcha] Request new Captcha
07-03 23:43:11 [2captcha] KO response when sending IN 2captcha : {"status":0,"request":"ERROR_ZERO_BALANCE"}
07-03 23:43:11 [2captcha] Request new Captcha
07-03 23:43:11 [2captcha] KO response when sending IN 2captcha : {"status":0,"request":"ERROR_ZERO_BALANCE"}
07-03 23:43:11 [2captcha] Request new Captcha

@drallieiv
Copy link
Owner

I disagree : It should be less agressive and trigger just a pause, but it should not stop the process.
If you add balance to it, it should make progress again.

It could be a good idea to stop the process, but they are designed to be unlinked between the thread providing the captchas and the worker thread waiting to be given a captcha. They currently are not expecting any other signal then being given a captcha to use.

Without changing the worker, at best we can stop the 2captcha thread, but there are no input that can be used to start it again.

With the server based app, that would be possible, but the command line usage does not allow interactions once it is started.

@tomballgithub
Copy link
Author

My recommendation would be to exit. I suspect most people would not expect the utility to restart gracefully by adding more $. That all said, it really doesn't hurt anything as is so I am OK with however you want to deal with this.

@drugol
Copy link

drugol commented Jul 17, 2017

I got my IP banned by 2captcha when I left Kinan spamming them with requests for, like, 12 hours or so. I also believe it is safer to just exit on zero balance.

Though it would be nice to analyze 2captcha funds at the start of the job and throw a warning if there is likely to be insufficient $$$ for the requested amount of accounts. I know it is hard to say for sure, since 2captcha prices and success rates vary from time to time, but +-20% estimate is also better than nothing.

@drallieiv
Copy link
Owner

okay @drugol i'll move that to priority, but I also first need to implement the required timings as described in :

https://2captcha.com/api-2captcha#limits

But that could be tricky if at one point several of your threads are using the same IP

The warning thingy at startup if low funds (message + few seconds timer) is a good idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants