📅  最后修改于: 2022-03-11 15:04:10.109000             🧑  作者: Mango
import urllib.request
API_URL = 'https://zeapi.yandex.net/lab/api/yalm/text3'
payload = {"text":"bebra"}
params = json.dumps(payload).encode('utf8')
req = urllib.request.Request(API_URL_2, data=params, headers=headers)
response = urllib.request.urlopen(req)
obj = json.loads(response.read())['predictions']