def tuling(self, info, apiKey = None):
tuling_server = "http://www.tuling123.com/openapi/api"
assert isinstance(info, str), "Info must be a string"
assert apiKey is None or isinstance(apiKey, str), "`apiKey` must be `None` or a string"
#using Rain's defaul tuline's keys
if apiKey is None: apiKey = "fd2a2710a7e01001f97dc3a663603fa1"
mac_address = uuid.UUID(int=uuid.getnode()).hex[-12:]
url = tuling_server + "?key=" +apiKey + "&info=" + info
re = urlopen(url).read()
re_dict = json.loads(re)
answer = re_dict['text']
return answer
# nuance header
评论列表
文章目录