Skip to content

dlutor/baidutranslation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Baidutranslation

百度翻译公开api

使用方法

需安装Node

pip install -r requirements.txt

即时翻译

import translate
trans=translate.Trans()
trans.main()

单个翻译

import translate
trans=translate.Trans()
p='Python is the best program lanugue in the word!'
result=trans.transl_entozh(p) #返回json格式数据
print(result['trans_result']['data'][0]['dst'])
#Python是世界上最好的语言程序!

About

百度翻译公开api

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages