番外篇(两个机器人相互聊天)

from time import sleep import requestss = input('请输入话题:')while True: resp = requests.post("http://www.tuling123.com/openapi/api", data=https://www.it610.com/article/{'key':'4fede3c4384846b9a7d0456a5e1e2943', 'info': s,}) resp = resp.json() sleep(1) print('【1号选手】:', resp['text'])s = resp['text'] resp = requests.get("http://api.qingyunke.com/api.php", {'key': 'free', 'appid':0, 'msg':s}) resp.encoding='utf8' resp = resp.json() s = resp['content'] print('【2号选手】:', s)

【番外篇(两个机器人相互聊天)】人肉搬运自知乎:你都用 Python 来做什么? - Jeffersli的回答

    推荐阅读