We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
import websocket import json import requests url = "http://192.168.66.29:8080/api/sendtxtmsg" ws_url = "ws://192.168.66.29:8080/ws/generalMsg" def on_message(ws, message): data = json.loads(message) data1 = { "wxid": "cbf_4151352321", "content": "你好" } response = requests.post(url, json=data1) print(response.text) def on_error(ws, error): print("Error:", error) def on_close(ws): print("Connection closed") def on_open(ws): print("Connection established") # 循环建立 WebSocket 连接 ws = websocket.WebSocketApp(ws_url, on_message=on_message, on_error=on_error, on_close=on_close) ws.on_open = on_open ws.run_forever()
这样会一直不停地发送“你好”,停不下来
The text was updated successfully, but these errors were encountered:
No branches or pull requests
这样会一直不停地发送“你好”,停不下来
The text was updated successfully, but these errors were encountered: