Giter VIP home page Giter VIP logo

Comments (8)

Furry avatar Furry commented on May 28, 2024 1

I've manually reverted the changes in https://github.com/Furry/2captcha/pull/10/files#diff-3923be146c30923916f3053402106966289a51bceaea0691ffdd4b30a9f0f376R144, substituting the previous 5000ms delay with this.pollingFrequency 50743ac

from 2captcha.

Furry avatar Furry commented on May 28, 2024

Could you elaborate a bit more on this? I'm not sure I understand what you mean.

from 2captcha.

yunielrc avatar yunielrc commented on May 28, 2024

Hi @Furry,

It's a waste of time to wait more than 5 seconds if the captcha isn't ready.

According to the 2captcha api documentation on https://2captcha.com/2captcha-api:
The process of solving captchas with 2captcha is really easy and it's mostly the same for all types of captchas:
....
Step 4. Submit a HTTP GET request to our API URL: http://2captcha.com/res.php to get the result.
If captcha is already solved server will return the answer in format corresponding to the type of your captcha.
By default answers are returned as plain text like: OK|Your answer. But answer can also be returned as JSON {"status":1,"request":"TEXT"} if json parameter is used.

LOOK AT HERE---> If captcha is not solved yet server will return CAPCHA_NOT_READY result. Repeat your request in 5 seconds.
...

from 2captcha.

NabiKAZ avatar NabiKAZ commented on May 28, 2024

About the issue raised and pull request.
And this quote:

https://2captcha.com/2captcha-api:
If captcha is not solved yet server will return CAPCHA_NOT_READY result. Repeat your request in 5 seconds.

In my opinion, these 5 seconds are just a suggestion and should be changed by the user. Otherwise 2captcha could control the request limit on the server and return the error to us, which is not the case.

This piece of code and number 5000ms is very strict:

case "CAPCHA_NOT_READY": return this.pollResponse(id, 5000);

https://github.com/Furry/2captcha/pull/10/files#diff-3923be146c30923916f3053402106966289a51bceaea0691ffdd4b30a9f0f376R144

I think it would be better to put the same pollingFreq instead and suggest it to the user in the documentation for 5 seconds.
Imagine that the captcha is ready and you have to wait at least 5 seconds for no reason.

Even if you do not have a plan for this change, it is better to delete this parameter altogether, because at the moment, the amount of interrupt we want to use only once at the beginning of the request is useless and also misleads the user.

from 2captcha.

Furry avatar Furry commented on May 28, 2024

Thanks for bringing it to my attention, I'll take a look and fix this later today after my classes!

from 2captcha.

NabiKAZ avatar NabiKAZ commented on May 28, 2024

seem you closed without review, maybe forgotten :)

from 2captcha.

Furry avatar Furry commented on May 28, 2024

I blame the 'close with comment' button

from 2captcha.

NabiKAZ avatar NabiKAZ commented on May 28, 2024

It's better, Thanks.

from 2captcha.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.