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

Implementing proxy? #9

Closed
porocode11 opened this issue Apr 4, 2021 · 5 comments
Closed

Implementing proxy? #9

porocode11 opened this issue Apr 4, 2021 · 5 comments

Comments

@porocode11
Copy link

Is there any plan of implementing proxy into this library?

I can make a pull request if you wish althrough I'm not sure how much will that help (I mean implementing the proxies).

From what I saw with the other open source library googletrans, google seems still able to detect the user even after proxy usage.

@Animenosekai
Copy link
Owner

I do think that it's a good idea and that it's worth implementing because it could be used to avoid getting rate limited to often.

I don't know what's best:

  • Giving a list of proxies and then using the next one when it isn't working anymore
  • Making a rotation system where they will be used once in order

@porocode11
Copy link
Author

The funny thing is that I cannot get google to rate limit me when using this. Tried with 10,000 requests (blocking and async) and I still was able to get it to translate.

Before finding this I was messing up with googletrans which I could easily get the rate limit on 1000 requests (without stopping, testing).

Using proxy with it had no difference, googletrans does not support them natively (meaning it does not show up as a feature).

I would love to contribute to this and add a proxy implementation but I have no idea how do I go about getting google to rate limit me.

I'm guessing this projects uses the latest google translate api (the hidden one) which was found a few weeks ago right?

@Animenosekai
Copy link
Owner

About the 10,000 requests: I think that you were hitting the cache lol (as explained in the Caching section of the README)

But the aim of this project is to use multiple services to fallback in case of an error somewhere.

So it would totally make sense if this project had a way better rate limit handling that googltrans as they are using only one endpoint and I'm using 5 different services (with some of them having multiple endpoints)

I'm not using the new Google Translate API but I'm planning on using it as one more endpoint to add (as you can see in the playground directory of this repo)

@Animenosekai
Copy link
Owner

The funny thing is that I cannot get google to rate limit me when using this. Tried with 10,000 requests (blocking and async) and I still was able to get it to translate.

Before finding this I was messing up with googletrans which I could easily get the rate limit on 1000 requests (without stopping, testing).

Using proxy with it had no difference, googletrans does not support them natively (meaning it does not show up as a feature).

I would love to contribute to this and add a proxy implementation but I have no idea how do I go about getting google to rate limit me.

I'm guessing this projects uses the latest google translate api (the hidden one) which was found a few weeks ago right?

@EvilMegaDroid

Ok starting from translatepy v1.6 (the latest version), translatepy uses the new Google Translate JSONRPC API (heavily inspired by the PR on googltrans, which I don't why they didn't merged it yet)

Here are the new things in v1.6: https://github.com/Animenosekai/translate/releases/tag/v1.6

@Animenosekai
Copy link
Owner

@EvilMegaDroid Proxies will be available in v2 #15

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

2 participants