python多语言翻译二

Goslate 免费谷歌翻译模块


谷歌升级了在线翻译系统, 新加入的 ticket 机制能有效地防止类似 goslate 这样简单的爬虫系统的访问. 技术上来说, 更加复杂的爬虫仍有可能成功抓取翻译, 但这么做已经越过了红线. Goslate 作者不再继续更新去破解 Google 的 ticket 机制. 所以此模块提供的方法可能有报错.
安装

pip install goslate

使用

import goslate
gs = goslate.Goslate()
print gs.translate('this is a pen', 'zh')

运行结果:

这是一支笔

你可能感兴趣的:(python)