import requests
把lion换成dog,cat等等查询都可以
formdata={
'from':'en',
'to':'zh-Hans',
'text':'cat',
}
headers={
"User-Agnet":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36"
}
r=requests.post(url=url,headers=headers,data=formdata)
print(r.json())
网友评论