Python googletrans

Question:

I just came across googletrans python package. This package translates quite well and seems to use google translation API. To my knowledge, google translation API is not free. What googletrans doing internally for the translations? Is it legal to use googletrans?

Asked By: FIre Panda

||

Answers:

The official documentation has information on this:

https://pypi.python.org/pypi/googletrans#how-does-this-library-work

You may wonder why this library works properly, whereas other approaches such like goslate won’t work since Google has updated its translation service recently with a ticket mechanism to prevent a lot of crawler programs.

I eventually figure out a way to generate a ticket by reverse engineering on the obfuscated and minified code used by Google to generate such token, and implemented on the top of Python. However, this could be blocked at any time.

As for the legality of this approach, this kind of stuff depends on the laws of the countries you live in, and is probably slightly off-topic.

Answered By: sneep