import requests
#百度翻译
url = 'https://fanyi.baidu.com'
#post请求体携带的参数,可通过开发者调试工具查看
#查看步骤:NetWork选项->Headers选项->Form Data
data = {
'from': 'zh',
'to': 'en',
'query': '编程帮www.biancheng.net你好'
}
response = requests.post(url, data=data)
print(response)