我想发送一些(大约 200k)请求Google Input API
并显示结果。例如我想发送deep
,它必须返回:
["deep","dépenses","dépend","dépendance","dépendant"]
我尝试了以下脚本,但没有帮助:
def request(word):
url = 'https://inputtools.google.com/request?text=' + word + '&itc=fr-t-i0-und&num=5&cp=0&cs=1&ie=utf-8&oe=utf-8&app=test'
conn = http.client.HTTPConnection(url)
res = conn.getresponse()
print(res.status, res.reason)
我想知道如何才能做到这一点?(请参阅我想在此处实现的示例)