2020
10-10
10-10
python利用google翻译方法实例(翻译字幕文件)
英文字幕确实让人头疼,因此,花了一天专门研究,用python实现了比较简单的翻译代码。仅有几十行首先加载模块pipuninstallgoogletransgitclonehttps://github.com/BoseCorp/py-googletrans.gitcd./py-googletrans&&pythonsetup.pyinstall使用测试fromgoogletransimportTranslator#实例化translator=Translator(service_urls=['translate.google.cn'])content='Todayisagooday'print(translator.translate(cont...
继续阅读 >