-
Notifications
You must be signed in to change notification settings - Fork 613
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
China doesn't work: Default URL banned, no proxy support, alternate URL not working #60
China doesn't work: Default URL banned, no proxy support, alternate URL not working #60
Comments
you can change the request url |
This has been fixed in a better manner in https://github.com/vitalets/google-translate-api as of the writing of this comment. |
Released yesterday @vitalets/google-translate-api where with help of @coltongit we can use custom const translate = require('@vitalets/google-translate-api');
translate('Ik spreek Engels', {to: 'en', tld: 'cn'}).then(res => { ... });
// sends request to translate.google.cn |
In China the regular page is banned, normally we have to use translate.google.cn instead.
No URL spec option
There doesn't seem to be an option to redirect the queries to a new URL (China's is probably the only meaningful one out there).
I tried manually modifying the URL in my version of the library but it didn't work. Unfamiliar with node debugging so unsure how to get low level HTTP response information. However, this is what it looks like from a browser.
No proxy option
I looked for a proxy option but apparently that doesn't exit either. I also tried setting the standard unix environment variables:
proxy
,http_proxy
,https_proxy
,proxy_all
, etc. but none appeared to take effect.The text was updated successfully, but these errors were encountered: