import http.client
import hashlib
import urllib
import random
import json
def baidu(kw):
appid = '' # 填写你的appid
secretKey = '' # 填写你的密钥
httpClient = None
myurl = '/api/trans/vip/translate'
fromLang = 'auto' # 原文语种
toLang = 'zh' # 译文语种
salt = random.randint(32768
Python接入百度通用翻译API(英中)
最新推荐文章于 2023-04-03 21:20:27 发布