import urllib.request
import urllib.parse
import json
# 请输入你要翻译的内容
key = input("请输入要翻译的内容:")
# 把提交的form表单数据转为bytes数据类型
data = {"i": key,
"from":"AUTO",
"to":"AUTO",
"smartresult":"dict",
"client":"fanyideskweb",
"salt":"1540373170893",
"sign":"a5d9b838efd03c9b383dc1dccb742038",
"doctype":"json",
"version":"2.1",
"keyfrom":"fanyi.web",
"action":"FY_BY_REALTIME",
"typoResult":"false"
}
# 字符串 i=python&from=