2020
11-25
11-25
python 简单的调用有道翻译
代码importjsonimportrequests#翻译函数,word需要翻译的内容deftranslate(word):#有道词典apiurl='http://fanyi.youdao.com/translate?smartresult=dict&smartresult=rule&smartresult=ugc&sessionFrom=null'#传输的参数,其中i为需要翻译的内容key={'type':"AUTO",'i':word,"doctype":"json","version":"2.1","keyfrom":"fanyi.web","ue":"UTF-8","action":"FY_BY...
继续阅读 >