脚本
#!/usr/bin/python3
import sys
import requests
import json
from termcolor import colored
url = 'https://fanyi.baidu.com/sug'
data = {'kw': sys.argv[1]}
res = requests.post(url, data=data).json()
print("")
for i in range(len(res['data'])):
key = res['data'][i]['k']
value = res['data'][i]['v']
print(f"-> {colored(key, attrs=['bold'])}: {colored(value, 'cyan', attrs=['bold'])}")
print("")