Git Product home page Git Product logo

Comments (21)

iamtraction avatar iamtraction commented on June 28, 2024

Can you give some details on how you're using it or what exactly you're doing?

from google-translate.

Andrey-Pavlov avatar Andrey-Pavlov commented on June 28, 2024

It happens randomly 30%-50% of tries.
Fiddler_ovRlq1DH9Q

from google-translate.

iamtraction avatar iamtraction commented on June 28, 2024

Why are you directly making the HTTP request instead of using the library?

from google-translate.

Andrey-Pavlov avatar Andrey-Pavlov commented on June 28, 2024

Why are you directly making the HTTP request instead of using the library?

To provide details for the issue

from google-translate.

codenaz avatar codenaz commented on June 28, 2024

@k3rn31p4nic This happens even when I use the library. The error is not consistent. It returns 403 and when you keep retrying, it then works

from google-translate.

iamtraction avatar iamtraction commented on June 28, 2024

Can you say what you're translating and the source and target language? I'm not able to reproduce this issue.

from google-translate.

codenaz avatar codenaz commented on June 28, 2024

translate('Bot fix time',{to:'yo'});
translate('Bot fix time',{from:'en' to:'es'});
translate('Bot fix time',{to:'spanish'});

That is just one example out of multiple. Every request I try regardless of the query or language gives that error. After retrying about once to four times, it works and then repeats again.

from google-translate.

iamtraction avatar iamtraction commented on June 28, 2024

Okay, I'm getting the same error now. From what I can observer, you'll get this error if you continuously make the request without enough delay (I need confirmation from others too).
If that's the case, I suppose this is a rate limit enforced by Google in their online translate service to prevent users like us from using it for purposes like this, for free, instead of using their actual Translate API.

from google-translate.

codenaz avatar codenaz commented on June 28, 2024

Funny enough it happens even on first tries. Unless by delay you mean it tracks request coming from this library?

from google-translate.

iamtraction avatar iamtraction commented on June 28, 2024

No, I meant from the same IP.

from google-translate.

codenaz avatar codenaz commented on June 28, 2024

Then, I doubt it is a delay issue. You can give it some more tries to confirm.

from google-translate.

iamtraction avatar iamtraction commented on June 28, 2024

Probably have to update the token generator.
https://github.com/k3rn31p4nic/google-translate-api/blob/411112851b27c6bd5698f6344a65f367e5dbc87a/src/tokenGenerator.js#L2-L5

from google-translate.

codenaz avatar codenaz commented on June 28, 2024

I have a similar feeling.

from google-translate.

Andrey-Pavlov avatar Andrey-Pavlov commented on June 28, 2024

It doesn't depend on delay. Even first try can return 403. Potentially is a token generator issue.

from google-translate.

cxmplex avatar cxmplex commented on June 28, 2024

Any update on this @k3rn31p4nic ?

from google-translate.

ZuBB avatar ZuBB commented on June 28, 2024

How about making request through proxy? // edit: it is just a quick guess

from google-translate.

Adizbek avatar Adizbek commented on June 28, 2024

@Andrey-Pavlov I don't think so, it isn't related to token, everything works on localhost, seems google is blocking IP which makes a lot of request.

Yes, adding proxy support would be great.

Upd: If I keep retrying it works

from google-translate.

Adizbek avatar Adizbek commented on June 28, 2024

#8 Check this PR, I didn't found any working proxies yet. But it should work

from google-translate.

iamtraction avatar iamtraction commented on June 28, 2024

Should be fixed by #8 or at least less chances of being blocked.

from google-translate.

Adizbek avatar Adizbek commented on June 28, 2024

@k3rn31p4nic Seems google changed API, they are migrating to new API. I think after migration we can't use at all.

from google-translate.

Adizbek avatar Adizbek commented on June 28, 2024

Checkout this #8 (comment), should work

from google-translate.

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.