我刚刚遇到 googletrans python 包。这个包翻译非常好,似乎使用google翻译API。据我所知,谷歌翻译API是不是免费的。 googletrans 在内部做什么来进行翻译?使用 googletrans 是否合法?
最佳答案
官方文档有这方面的信息:
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.
至于这种做法的合法性,这种东西取决于你所居住国家的法律,可能有点题外话。
关于Python 谷歌翻译,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49319836/