python 问答机器人

# coding=utf-8
import requests
url = 'https://api.ownthink.com/bot?spoken=三体作者是谁'
response = requests.get(url)
response.encoding = 'utf-8'
html = response.text
graph = eval(html)
answer = graph['data']['info']['text']
print(answer)

你可能感兴趣的:(python 问答机器人)