简体   繁体   中英

Python googletrans

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 ?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM