```import itchat
import requests
itchat.auto_login(hotReload=True)
apiurl = 'http://www.tuling123.com/openapi/api'
def get_message(message):
'''接受微信好友消息 根据消息回复微信好友'''
data ={
'key':'48a24ea3ccc24d658c1535abaf68b7f4',
'info': message,
'userId':'robot'
}
try:
r =requests.post(apiurl,data=data).json()
# 200 请求成功
print('robot 的回复%s'%r['text'])
return r['text']
except:
return ''
https://jingyan.baidu.com/article/c35dbcb015c5f8c916fcbcf3.html