Python
import urllib.requestimport urllib.parse
url = 'http://fanyi.youdao.com/translate_o?smartresult=dict&smartresult=rule&sessionFrom='
data = {}
data['type'] = 'AUTO'
data['i'] = 'I love FishC.com'
data['doctype'] = 'json'
data['xmlVersion'] = '2.1'
data['keyfrom'] = 'fanyi.web'
data['ue'] = 'UTF-8'
data['typoResult'] = 'true'
data['smartresult'] = 'dict'
data = urllib.parse.urlencode(data).encode('utf-8')
response = urllib.request.urlopen(url,data)
html = response.read().decode('utf-8')
print(html)
为什么系统给我返回的是这个:{"errorCode":50} 标题不错,不过你发错了板块{:10_250:} 丶忘却的年少o 发表于 2017-10-25 19:43
标题不错,不过你发错了板块
能帮我解决一下吗,谢谢 皮皮小发 发表于 2017-10-25 20:15
能帮我解决一下吗,谢谢
我也很想帮你解决,可是我没学python{:10_319:} 你发错板块了,老兄 身骑白马入华山 发表于 2017-10-25 20:27
你发错板块了,老兄
不好意思,发错了,第一次发帖{:5_109:}
页:
[1]