-
-
Notifications
You must be signed in to change notification settings - Fork 73
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
HTTPError 302 after regular translation #12
Comments
Are you still getting the error? |
Can you give a minimal reproducible example? |
I did not watch the implementation, but the requests themselves towards Google translator are banned with frequent use. The first several times is ok, after several times start to throw different errors or res.text is empty string In case like this
there throws something like:
If text is longer then error is another:
Do you know how often you can make requests without errors? |
Hmm I've been looking into this problem and it seems to be pretty common - from what I've gathered so far, it seems the only way to get around the errors is either to slow down your requests, or use proxies so you don't get ratelimmited by Google |
Nope. As this isn't an official API, we don't know about their rate limits. |
How long of a text are you trying to send? |
Closing it as it has become stale. Feel free to reopen if you're still facing the issue and have reproduction steps. |
After a few successful translates start to fail with warnings:
node index.js { HTTPError at translate (C:\Users\User\Desktop\node_test\node_modules\@k3rn31p4nic\google-translate-api\src\index.js:143:19) at process._tickCallback (internal/process/next_tick.js:68:7) name: 'HTTPError', statusCode: 302, statusMessage: 'Found' }
index.js:
translate(articleRU, { from: 'ru', to: 'bg' }).then(res => { console.log(res.text); }).catch(err => { console.error(err); });
The text was updated successfully, but these errors were encountered: