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

Using Proxy #36

Open
Blair2004 opened this issue Apr 12, 2021 · 17 comments
Open

Using Proxy #36

Blair2004 opened this issue Apr 12, 2021 · 17 comments

Comments

@Blair2004
Copy link

Hi,
Thank you for your work.
I have a question, is there a way to make the library works (makes requests) via a proxy. Because if we do a lot of translation request to Google, somehow the IP gets banned. So, using a proxy might prevent this.

Thanks.

@mega94
Copy link

mega94 commented Apr 13, 2021

error: "Google detected unusual traffic from your computer network, try again later (2 - 48 hours)"

@ermeh
Copy link

ermeh commented Apr 18, 2021

How to use proxy? Will you please let us know?

@Blair2004
Copy link
Author

I thought I have explained already... This consist of using a collection of random IP that can be used to prevent bans from too many request error.

@ermeh
Copy link

ermeh commented Apr 18, 2021

I know that :) Just asking how we can integrate proxies to this script.

@Blair2004
Copy link
Author

If the script is proceeding request to a remote service I guess the HTTP client should offer such option. I don't know if the scripts use Guzzle, but with that, you can define a proxy client.

https://docs.guzzlephp.org/en/stable/request-options.html#proxy

@ermeh
Copy link

ermeh commented Apr 18, 2021

I think this question must be replied by the script developer.

@Blair2004
Copy link
Author

When you asked your question, I'm sorry if I believed you were talking to me. I also didn't notice you're highjacking the thread. 😅😅😅

@carlosvaldesweb
Copy link

I'm having the same problem, did you solve it?

@aydinrzyv
Copy link

I've got the same issue, did anybody solve it?

@mcolominas
Copy link

I have a question, can I find out why you want to use a proxy? In case of connecting it and making many requests, Google will ban the proxy's IP, therefore, will it also stop working, or do I forget something?

@Blair2004
Copy link
Author

Me, I fixed this issue a while ago. I'm using a home made script (adonisjs) that is based on the Chrome Extension of Google Translate. That script work far beyond my expectations as it can safely translate an HTML page with tags.

I'm using many different premium proxies to make sure, whatever translation I have to do during a day, I won't get banned. I thinking releasing it as a package for Laravel, I'm just meanwhile very busy.

@mcolominas
Copy link

Hello @Blair2004 , by premium proxies you mean paid proxies?

@Blair2004
Copy link
Author

Hello @Blair2004 , by premium proxies you mean paid proxies?

Yes.

@mcolominas
Copy link

@Blair2004 I don't know how much money you will be paying to use the proxies, but since you pay, wouldn't it be better for you to use this #38 (comment)? it also has a function to translate html

@Blair2004
Copy link
Author

Hi, I'm paying around $4 monthly, I have created a multilingual (16 languages) blog and so far the tool I created translate very well. Most translation packages :

  • doesn't translate well (accuracy)
  • doesn't support HTML

That's the reason why I stopped using those.

@mcolominas
Copy link

So I do not understand it, what I have put in that comment is the translation paid google service, so it would have to be better than the free one and also, if it supports html https://cloud.google.com/translate/docs/reference/rest/v2/translate

If you say that you are already happy with what you use, use that, I'll be waiting for you to take out the package (if you take it out) to see how you have done it.

@ermeh
Copy link

ermeh commented Jan 26, 2023

Is there anyone who adds proxies to this script and is happy with the way it works?

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

6 participants