Python 谷歌翻译

标签 python google-translate googletrans

我刚刚遇到 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/

相关文章:

python - 使用自定义比较器按任一元组值对元组字典进行排序

python - 如何在视频中添加音频?

python - 如何使用 SQLAlchemy 将关系对象数据插入数据库?

php - 用谷歌翻译翻译网站页面的最佳 SEO 方法

python - 在Python中定位小数点后的数字

java - 如何在JAVA中制作谷歌翻译支持语言的HashMap?

java - 为什么 Google Cloud API 会尝试以最终用户身份进行连接?

Python googletrans编码奇怪的字符

Python (googletrans) - 属性错误 : 'NoneType' object has no attribute 'group'